Personal Nix setup
at main 1.4 kB view raw
1{ inputs, modulesPath, ... }: 2 3{ 4 imports = with inputs; [ 5 apple-silicon.nixosModules.apple-silicon-support 6 (modulesPath + "/installer/scan/not-detected.nix") 7 ]; 8 9 networking.hostId = "e8618fd7"; 10 11 boot = { 12 supportedFilesystems = [ "btrfs" ]; 13 loader = { 14 systemd-boot.enable = true; 15 efi.canTouchEfiVariables = false; 16 }; 17 }; 18 19 fileSystems."/" = { 20 device = "/dev/disk/by-label/NIXROOT"; 21 fsType = "btrfs"; 22 options = [ "subvol=@root" "noatime" ]; 23 }; 24 25 fileSystems."/nix" = { 26 device = "/dev/disk/by-label/NIXROOT"; 27 fsType = "btrfs"; 28 options = [ "subvol=@nix" "noatime" "compress=zstd" ]; 29 }; 30 31 fileSystems."/home" = { 32 device = "/dev/disk/by-label/NIXROOT"; 33 fsType = "btrfs"; 34 options = [ "subvol=@home" "noatime" ]; 35 }; 36 37 fileSystems."/var/log" = { 38 device = "/dev/disk/by-label/NIXROOT"; 39 fsType = "btrfs"; 40 options = [ "subvol=@log" "noatime" ]; 41 }; 42 43 fileSystems."/swap" = { 44 device = "/dev/disk/by-label/NIXROOT"; 45 fsType = "btrfs"; 46 options = [ "subvol=@swap" "noatime" ]; 47 }; 48 49 fileSystems."/boot" = { 50 device = "/dev/disk/by-uuid/E617-1CEC"; 51 fsType = "vfat"; 52 options = [ "fmask=0022" "dmask=0022" ]; 53 }; 54 55 swapDevices = [ 56 { device = "/swap/swapfile"; } 57 ]; 58 59 nixpkgs.overlays = [ inputs.apple-silicon.overlays.apple-silicon-overlay ]; 60}