diff --git a/hosts/extern/boot/default.nix b/hosts/extern/boot/default.nix index a035652..647ffc9 100644 --- a/hosts/extern/boot/default.nix +++ b/hosts/extern/boot/default.nix @@ -1,8 +1,12 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: { boot = { kernelPackages = pkgs.unstable.linuxPackages_latest; - kernel.sysctl."vm.max_map_count" = 2147483642; blacklistedKernelModules = [ "pcspkr" ]; }; + + # Kernel that won't explode the MacBook Air + specialisation.nouveau.configuration.config = { + boot.kernelPackages = lib.mkForce pkgs.linuxPackages_5_10; + }; } diff --git a/hosts/tower/boot/default.nix b/hosts/tower/boot/default.nix index e9f1ddc..1251240 100644 --- a/hosts/tower/boot/default.nix +++ b/hosts/tower/boot/default.nix @@ -17,7 +17,6 @@ in { boot = { # Must be Zen for IOMMU isolation kernelPackages = pkgs.unstable.linuxPackages_zen; - kernel.sysctl."vm.max_map_count" = 2147483642; kernelParams = commonKernelParams ++ [ "vfio-pci.ids=10de:1f82,10de:10fa" ]; blacklistedKernelModules = [ "pcspkr" ]; @@ -42,6 +41,6 @@ in { specialisation.nouveau.configuration.config = { system.video.nvidia.enable = lib.mkForce false; system.video.nouveau.enable = lib.mkForce true; - environment.sessionVariables.NIXOS_OZONE_WL = lib.mkForce "0"; + environment.sessionVariables.NIXOS_OZONE_WL = lib.mkForce ""; }; } diff --git a/modules/system/devices/boot/default.nix b/modules/system/devices/boot/default.nix index b918b95..2c2533f 100644 --- a/modules/system/devices/boot/default.nix +++ b/modules/system/devices/boot/default.nix @@ -5,4 +5,9 @@ ./services ./systemd ]; + + boot.kernel.sysctl = { + "vm.max_map_count" = 2147483642; + "kernel.sysrq" = 1; + }; } diff --git a/modules/system/services/general/default.nix b/modules/system/services/general/default.nix index b919c34..682795a 100644 --- a/modules/system/services/general/default.nix +++ b/modules/system/services/general/default.nix @@ -2,6 +2,7 @@ { imports = [ ./displaymanager + ./earlyoom ./gnome-keyring ./gvfs ./keyd diff --git a/modules/system/services/general/earlyoom/default.nix b/modules/system/services/general/earlyoom/default.nix new file mode 100644 index 0000000..314cf48 --- /dev/null +++ b/modules/system/services/general/earlyoom/default.nix @@ -0,0 +1,4 @@ +{ ... }: +{ + services.earlyoom.enable = true; +}