summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAzat Bahawi <azat@bahawi.net>2024-06-27 18:10:21 +0300
committerAzat Bahawi <azat@bahawi.net>2024-06-27 18:10:21 +0300
commitb212b16a14ea12384c4b19ad453076502855a738 (patch)
treedefd42780c334342e82d59ac927ae070e9af5fd7 /modules
parent75918debfd7245d90478f882b0323a705ab3c7be (diff)
2024-06-27
Diffstat (limited to 'modules')
-rw-r--r--modules/common/kernel.nix56
-rw-r--r--modules/common/nix.nix3
-rw-r--r--modules/common/users.nix5
-rw-r--r--modules/emacs/default.nix2
-rw-r--r--modules/emacs/doom/init.el2
-rw-r--r--modules/games/steam-run.nix13
-rw-r--r--modules/games/steam.nix1
-rw-r--r--modules/profiles/default.nix1
-rw-r--r--modules/profiles/headful.nix3
9 files changed, 35 insertions, 51 deletions
diff --git a/modules/common/kernel.nix b/modules/common/kernel.nix
index 5c45b5d..ddc4f62 100644
--- a/modules/common/kernel.nix
+++ b/modules/common/kernel.nix
@@ -1,38 +1,30 @@
{ lib, ... }:
with lib;
{
- boot = {
- # I don't use it even on laptops. It's also /required/ to disable it for
- # ZFS[1].
- # [1]: https://github.com/openzfs/zfs/issues/260
- # [1]: https://github.com/openzfs/zfs/issues/12842
- kernelParams = [ "hibernate=no" ];
-
- kernel.sysctl = {
- "fs.file-max" = pow 2 17;
- "fs.inotify.max_user_watches" = pow 2 19;
- "fs.suid_dumpable" = 0;
- "kernel.core_uses_pid" = 1;
- "kernel.exec-shield" = 1;
- "kernel.kptr_restrict" = 1;
- "kernel.maps_protect" = 1;
- "kernel.msgmax" = pow 2 16;
- "kernel.msgmnb" = pow 2 16;
- "kernel.pid_max" = pow 2 16;
- "kernel.randomize_va_space" = 2;
- "kernel.shmall" = pow 2 28;
- "kernel.shmmax" = pow 2 28;
- "kernel.sysrq" = 0;
- "vm.dirty_background_bytes" = pow 2 22;
- "vm.dirty_background_ratio" = 5;
- "vm.dirty_bytes" = pow 2 22;
- "vm.dirty_ratio" = 30;
- "vm.min_free_kbytes" = pow 2 16;
- "vm.mmap_min_addr" = pow 2 12;
- "vm.overcommit_memory" = mkDefault 0;
- "vm.overcommit_ratio" = mkDefault 50;
- "vm.vfs_cache_pressure" = 50;
- };
+ boot.kernel.sysctl = {
+ "fs.file-max" = pow 2 17;
+ "fs.inotify.max_user_watches" = pow 2 19;
+ "fs.suid_dumpable" = 0;
+ "kernel.core_uses_pid" = 1;
+ "kernel.exec-shield" = 1;
+ "kernel.kptr_restrict" = 1;
+ "kernel.maps_protect" = 1;
+ "kernel.msgmax" = pow 2 16;
+ "kernel.msgmnb" = pow 2 16;
+ "kernel.pid_max" = pow 2 16;
+ "kernel.randomize_va_space" = 2;
+ "kernel.shmall" = pow 2 28;
+ "kernel.shmmax" = pow 2 28;
+ "kernel.sysrq" = 0;
+ "vm.dirty_background_bytes" = pow 2 22;
+ "vm.dirty_background_ratio" = 5;
+ "vm.dirty_bytes" = pow 2 22;
+ "vm.dirty_ratio" = 30;
+ "vm.min_free_kbytes" = pow 2 16;
+ "vm.mmap_min_addr" = pow 2 12;
+ "vm.overcommit_memory" = mkDefault 0;
+ "vm.overcommit_ratio" = mkDefault 50;
+ "vm.vfs_cache_pressure" = 50;
};
# https://docs.kernel.org/admin-guide/mm/ksm.html
diff --git a/modules/common/nix.nix b/modules/common/nix.nix
index 3342113..aad7106 100644
--- a/modules/common/nix.nix
+++ b/modules/common/nix.nix
@@ -141,7 +141,6 @@ in
};
environment = {
- localBinInPath = true;
defaultPackages = [ ];
systemPackages =
with pkgs;
@@ -150,7 +149,7 @@ in
nixfiles
];
variables = {
- NIXFILES = "${config.my.home}/src/nixfiles";
+ NIXFILES = optionalString this.isHeadful "${config.my.home}/src/nixfiles";
NIX_SHELL_PRESERVE_PROMPT = "1";
};
};
diff --git a/modules/common/users.nix b/modules/common/users.nix
index ba1a89b..b8aca28 100644
--- a/modules/common/users.nix
+++ b/modules/common/users.nix
@@ -18,7 +18,10 @@ in
mutableUsers = false;
users = {
- root.hashedPassword = "@HASHED_PASSWORD@";
+ root = {
+ hashedPassword = null;
+ password = null;
+ };
${my.username} = {
isNormalUser = true;
diff --git a/modules/emacs/default.nix b/modules/emacs/default.nix
index 8a6707c..b466b64 100644
--- a/modules/emacs/default.nix
+++ b/modules/emacs/default.nix
@@ -249,7 +249,7 @@ in
programs = {
emacs = {
enable = true;
- package = pkgs.emacs29;
+ package = pkgs.emacs29-pgtk;
};
bash.initExtra = mkAfter ''
diff --git a/modules/emacs/doom/init.el b/modules/emacs/doom/init.el
index ac4a687..ed0e048 100644
--- a/modules/emacs/doom/init.el
+++ b/modules/emacs/doom/init.el
@@ -45,7 +45,7 @@
grammar
:tools
- ansible
+ ;; ansible
(debugger +lsp)
direnv
(docker +lsp)
diff --git a/modules/games/steam-run.nix b/modules/games/steam-run.nix
index cfee8ae..f6902c0 100644
--- a/modules/games/steam-run.nix
+++ b/modules/games/steam-run.nix
@@ -20,18 +20,7 @@ in
};
config = mkIf cfg.enable {
- nixfiles.modules = {
- common.nix.allowedUnfreePackages = [
- "steam"
- "steam-run"
- ];
-
- games = {
- enable32BitSupport = true;
- gamemode.enable = true;
- mangohud.enable = true;
- };
- };
+ nixfiles.modules.games.steam.enable = true;
hm.home.packages = with pkgs; [
(steam.override {
diff --git a/modules/games/steam.nix b/modules/games/steam.nix
index 5883b0e..23b4f14 100644
--- a/modules/games/steam.nix
+++ b/modules/games/steam.nix
@@ -16,6 +16,7 @@ in
common.nix.allowedUnfreePackages = [
"steam"
"steam-original"
+ "steam-run"
];
games = {
diff --git a/modules/profiles/default.nix b/modules/profiles/default.nix
index 61f93b9..5265fda 100644
--- a/modules/profiles/default.nix
+++ b/modules/profiles/default.nix
@@ -55,6 +55,7 @@ in
lsof
pciutils
psmisc
+ rsync
smartmontools
sysstat
tree
diff --git a/modules/profiles/headful.nix b/modules/profiles/headful.nix
index 8951d83..d58eed0 100644
--- a/modules/profiles/headful.nix
+++ b/modules/profiles/headful.nix
@@ -89,11 +89,10 @@ in
systemd-boot = {
enable = true;
+ editor = false;
configurationLimit = 10;
};
};
-
- consoleLogLevel = 3;
};
hardware.graphics.enable = true;