Nix configurations for my homelab
at main 2.1 kB view raw
1{ lib, modulesPath, ... }: 2{ 3 imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; 4 5 boot = { 6 initrd = { 7 availableKernelModules = [ 8 "xhci_pci" 9 "ahci" 10 "usbhid" 11 "usb_storage" 12 "sd_mod" 13 ]; 14 kernelModules = [ ]; 15 }; 16 kernelModules = [ "kvm-intel" ]; 17 loader = { 18 efi.canTouchEfiVariables = true; 19 systemd-boot = { 20 configurationLimit = 50; 21 consoleMode = "auto"; 22 enable = true; 23 }; 24 timeout = 0; 25 }; 26 tmp.useTmpfs = true; 27 }; 28 29 zramSwap.enable = true; 30 31 fileSystems = { 32 "/" = { 33 device = "none"; 34 fsType = "tmpfs"; 35 options = [ 36 "defaults" 37 "mode=755" 38 ]; 39 }; 40 "/nix" = { 41 device = "/dev/disk/by-uuid/f31dac70-545a-41bc-97da-39fabafb2b3b"; 42 fsType = "btrfs"; 43 options = [ 44 "subvol=@nixos/nix" 45 "compress=zstd" 46 "discard=async" 47 ]; 48 }; 49 "/config" = { 50 device = "/dev/disk/by-uuid/f31dac70-545a-41bc-97da-39fabafb2b3b"; 51 fsType = "btrfs"; 52 options = [ 53 "subvol=@nixos/config" 54 "compress=zstd" 55 "discard=async" 56 ]; 57 }; 58 "/data" = { 59 device = "/dev/disk/by-uuid/f31dac70-545a-41bc-97da-39fabafb2b3b"; 60 fsType = "btrfs"; 61 options = [ 62 "subvol=@nixos/data" 63 "compress=zstd" 64 "discard=async" 65 ]; 66 neededForBoot = true; 67 }; 68 "/home/mou" = { 69 device = "/dev/disk/by-uuid/f31dac70-545a-41bc-97da-39fabafb2b3b"; 70 fsType = "btrfs"; 71 options = [ 72 "subvol=@home/mou" 73 "compress=zstd" 74 "discard=async" 75 ]; 76 }; 77 "/boot" = { 78 device = "/dev/disk/by-uuid/AA21-D01C"; 79 fsType = "vfat"; 80 options = [ 81 "fmask=0077" 82 "dmask=0077" 83 "defaults" 84 ]; 85 }; 86 }; 87 88 hardware = { 89 enableRedistributableFirmware = true; 90 cpu.intel.updateMicrocode = true; 91 }; 92 93 swapDevices = [ ]; 94 networking.useDHCP = lib.mkDefault true; 95 nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 96}