From bea86fa37249826e32a3a2e76867a8cb6a6f4c91 Mon Sep 17 00:00:00 2001 From: ChUrl Date: Wed, 13 Jul 2022 20:00:40 +0200 Subject: [PATCH] hardware --- nixos/hardware-configuration.nix | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/nixos/hardware-configuration.nix b/nixos/hardware-configuration.nix index fd07457c..7fb8fbd3 100644 --- a/nixos/hardware-configuration.nix +++ b/nixos/hardware-configuration.nix @@ -6,11 +6,13 @@ { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = - [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; + boot = { + initrd.availableKernelModules = + [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + initrd.kernelModules = [ ]; + kernelModules = [ "kvm-intel" ]; + extraModulePackages = [ ]; + }; fileSystems."/" = { device = "/dev/disk/by-uuid/b87bbc3d-edd3-434a-b4a3-859bf62b8a17"; @@ -37,7 +39,12 @@ fsType = "ext4"; }; - swapDevices = [ ]; + swapDevices = lib.mkForce [ + # { + # device = "/var/swap"; + # size = 1024 * 16 * 2; # twice the RAM for hibernation + # } + ]; # 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