From afa86b08f7d67ac293b84c3d0b83316b9aa30b06 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 26 Apr 2022 15:28:07 +0200 Subject: [PATCH 1/2] zephyrus: enable intel microcode --- hosts/zephyrus/hardware-configuration.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hosts/zephyrus/hardware-configuration.nix b/hosts/zephyrus/hardware-configuration.nix index a973019..21c98d3 100644 --- a/hosts/zephyrus/hardware-configuration.nix +++ b/hosts/zephyrus/hardware-configuration.nix @@ -52,5 +52,8 @@ in { powerManagement.cpuFreqGovernor = mkDefault "powersave"; - hardware.enableRedistributableFirmware = true; + hardware = { + enableRedistributableFirmware = true; + cpu.intel.updateMicrocode = true; + }; } From 99f2ef62a36468778385f969294edd369e6bd828 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 26 Apr 2022 15:28:16 +0200 Subject: [PATCH 2/2] zephyrus: enable swapfile --- hosts/zephyrus/hardware-configuration.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hosts/zephyrus/hardware-configuration.nix b/hosts/zephyrus/hardware-configuration.nix index 21c98d3..d9e1c75 100644 --- a/hosts/zephyrus/hardware-configuration.nix +++ b/hosts/zephyrus/hardware-configuration.nix @@ -48,7 +48,18 @@ in { fsType = "vfat"; }; - swapDevices = []; + fileSystems."/swap" = { + device = "/dev/disk/by-uuid/6395cef1-c30b-450a-917c-cfb3c0380642"; + fsType = "btrfs"; + options = ["subvol=@swap" "compress=zstd" "noatime"]; + }; + + swapDevices = [ + { + device = "/swap/swapfile"; + size = 1024 * 8; # half of RAM size + } + ]; powerManagement.cpuFreqGovernor = mkDefault "powersave";