From c602a9a622c4b2a20f7cbe2b130555d6c49c8f75 Mon Sep 17 00:00:00 2001 From: Daniel Langbein Date: Tue, 26 Sep 2023 20:13:18 +0200 Subject: [PATCH] yodaNas swapfile --- hosts/yodaNas/hardware-configuration.nix | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/hosts/yodaNas/hardware-configuration.nix b/hosts/yodaNas/hardware-configuration.nix index cbb05f6..3f26aa6 100644 --- a/hosts/yodaNas/hardware-configuration.nix +++ b/hosts/yodaNas/hardware-configuration.nix @@ -8,7 +8,7 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; @@ -26,13 +26,26 @@ fsType = "vfat"; }; - swapDevices = [ ]; +# fileSystems."/var/lib/docker/btrfs" = +# { device = "/@/var/lib/docker/btrfs"; +# fsType = "none"; +# options = [ "bind" ]; +# }; + + fileSystems."/swap" = + { device = "/dev/disk/by-uuid/b02e7bc6-62e0-46b5-8d5f-869b464c4491"; + fsType = "btrfs"; + options = [ "subvol=@swap" ]; + }; + + swapDevices = [ { device = "/swap/swapfile"; } ]; # 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 # still possible to use this option, but it's recommended to use it in conjunction # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; + # networking.interfaces.docker0.useDHCP = lib.mkDefault true; # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";