From b1aa0d977144b38677021df2495158ed301cbd55 Mon Sep 17 00:00:00 2001 From: Felix Tenley Date: Mon, 31 Jan 2022 23:03:47 +0100 Subject: [PATCH] refactor: move swap config into hardware configuration --- hardware/felix-nixos.nix | 5 ++++- home-pc.nix | 6 ------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/hardware/felix-nixos.nix b/hardware/felix-nixos.nix index 9058489..a212599 100644 --- a/hardware/felix-nixos.nix +++ b/hardware/felix-nixos.nix @@ -43,7 +43,10 @@ fsType = "vfat"; }; - swapDevices = [ ]; + swapDevices = [{ + device = "/.swap/swapfile"; + size = 8192; + }]; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; diff --git a/home-pc.nix b/home-pc.nix index f6050a2..b455bcf 100644 --- a/home-pc.nix +++ b/home-pc.nix @@ -15,12 +15,6 @@ ./services/pcscd.nix ]; - # declarative config broken atm: https://github.com/NixOS/nixpkgs/issues/91986 - swapDevices = [{ - device = "/.swap/swapfile"; - size = 8192; - }]; - nixpkgs.config.allowUnfree = true; boot.loader.systemd-boot.memtest86.enable = true;