diff --git a/hosts/desktop/disko.nix b/hosts/desktop/disko.nix index 4eafc11..1c8789e 100644 --- a/hosts/desktop/disko.nix +++ b/hosts/desktop/disko.nix @@ -45,6 +45,7 @@ size = "20G"; content = { type = "swap"; + discardPolicy = "both"; resumeDevice = true; }; }; diff --git a/hosts/desktop/hardware.nix b/hosts/desktop/hardware.nix index a69b7d9..4e4df2f 100644 --- a/hosts/desktop/hardware.nix +++ b/hosts/desktop/hardware.nix @@ -20,6 +20,10 @@ _: { "usbhid" "sd_mod" ]; + kernelParams = [ + "zswap.enabled=1" + "zswap.shrinker_enabled=1" + ]; }; # Prevent immediate wake-up from suspend caused by the logi bolt receiver diff --git a/hosts/laptop/disko.nix b/hosts/laptop/disko.nix index 4a0923f..7dbe535 100644 --- a/hosts/laptop/disko.nix +++ b/hosts/laptop/disko.nix @@ -42,6 +42,7 @@ size = "20G"; content = { type = "swap"; + discardPolicy = "both"; resumeDevice = true; }; }; diff --git a/hosts/laptop/hardware.nix b/hosts/laptop/hardware.nix index f3153a5..e38b8ca 100644 --- a/hosts/laptop/hardware.nix +++ b/hosts/laptop/hardware.nix @@ -18,6 +18,10 @@ "usb_storage" "sd_mod" ]; + kernelParams = [ + "zswap.enabled=1" + "zswap.shrinker_enabled=1" + ]; }; services = { diff --git a/hosts/srv-core/disko.nix b/hosts/srv-core/disko.nix index b1c4d38..8cd022a 100644 --- a/hosts/srv-core/disko.nix +++ b/hosts/srv-core/disko.nix @@ -16,7 +16,10 @@ partitions = { swap = { size = "8G"; - content.type = "swap"; + content = { + type = "swap"; + discardPolicy = "both"; + }; }; root = { size = "100%"; diff --git a/hosts/srv-core/hardware.nix b/hosts/srv-core/hardware.nix index ac0e37c..888a405 100644 --- a/hosts/srv-core/hardware.nix +++ b/hosts/srv-core/hardware.nix @@ -10,6 +10,10 @@ _: { "sd_mod" "sdhci_pci" ]; + kernelParams = [ + "zswap.enabled=1" + "zswap.shrinker_enabled=1" + ]; supportedFilesystems = [ "bcachefs" ]; diff --git a/hosts/vps-ns/hardware.nix b/hosts/vps-ns/hardware.nix index 073f92f..ea58368 100644 --- a/hosts/vps-ns/hardware.nix +++ b/hosts/vps-ns/hardware.nix @@ -12,4 +12,6 @@ "sd_mod" "sr_mod" ]; + + zramSwap.enable = true; } diff --git a/hosts/vps-www/hardware.nix b/hosts/vps-www/hardware.nix index 073f92f..ea58368 100644 --- a/hosts/vps-www/hardware.nix +++ b/hosts/vps-www/hardware.nix @@ -12,4 +12,6 @@ "sd_mod" "sr_mod" ]; + + zramSwap.enable = true; } diff --git a/modules/nixos/services/bluetooth.nix b/modules/nixos/services/bluetooth.nix index 31d4f36..aa9d0ae 100644 --- a/modules/nixos/services/bluetooth.nix +++ b/modules/nixos/services/bluetooth.nix @@ -6,7 +6,7 @@ hardware = { bluetooth = { enable = true; - powerOnBoot = true; + powerOnBoot = false; }; logitech.wireless.enable = true; }; diff --git a/profiles/core.nix b/profiles/core.nix index 53f02d1..c2913bc 100644 --- a/profiles/core.nix +++ b/profiles/core.nix @@ -93,8 +93,6 @@ vimAlias = true; }; - zramSwap.enable = true; - environment.systemPackages = [ (lib.hiPrio pkgs.uutils-coreutils-noprefix) pkgs.git