From 7cfc2e5a24c4d2a648ea8823a1f3387689109b9e Mon Sep 17 00:00:00 2001 From: Petru Paler Date: Fri, 30 Jun 2023 10:40:35 +0100 Subject: [PATCH] Consolidate swap settings. --- hosts/c1/default.nix | 5 ----- hosts/c1/hardware.nix | 8 ++++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/hosts/c1/default.nix b/hosts/c1/default.nix index 079ba83..facd37b 100644 --- a/hosts/c1/default.nix +++ b/hosts/c1/default.nix @@ -7,9 +7,4 @@ ]; networking.hostName = "c1"; - - swapDevices = pkgs.lib.mkForce [ { - device = "/dev/disk/by-id/nvme-eui.002538b981b03d98-part2"; - randomEncryption.enable = true; - }]; } diff --git a/hosts/c1/hardware.nix b/hosts/c1/hardware.nix index c748107..c7362af 100644 --- a/hosts/c1/hardware.nix +++ b/hosts/c1/hardware.nix @@ -1,6 +1,3 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. { config, lib, pkgs, modulesPath, ... }: { @@ -44,7 +41,10 @@ fsType = "vfat"; }; - swapDevices = [ ]; + swapDevices = [ { + device = "/dev/disk/by-id/nvme-eui.002538b981b03d98-part2"; + randomEncryption.enable = true; + }]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's