Nix configurations for my personal machines (Linux & macOS)
1{ 2 delib, 3 inputs, 4 ... 5}: 6delib.module { 7 name = "nix"; 8 9 # TODO: double check home-manager options 10 home.always = { 11 nixpkgs.config = import ../files/nixpkgs-config.nix; 12 xdg.configFile."nixpkgs/config.nix".source = ../files/nixpkgs-config.nix; 13 }; 14 15 nixos.always = { 16 nixpkgs.config = import ../files/nixpkgs-config.nix; 17 18 nix = { 19 gc = { 20 automatic = true; 21 options = "--delete-older-than 10d"; 22 dates = "weekly"; 23 }; 24 25 nixPath = ["nixpkgs=${inputs.nixpkgs}"]; 26 27 registry.nixpkgs.to = { 28 type = "path"; 29 path = inputs.nixpkgs; 30 narHash = inputs.nixpkgs.narHash; 31 }; 32 33 settings = { 34 auto-optimise-store = true; 35 experimental-features = ["nix-command" "flakes"]; 36 trusted-users = ["root" "@wheel" "ovy"]; 37 }; 38 }; 39 40 system.tools.nixos-option.enable = false; 41 }; 42 43 darwin.always = { 44 nixpkgs.config = import ../files/nixpkgs-config.nix; 45 46 nix = { 47 buildMachines = [ 48 { 49 hostName = "rushing.axolotl-map.ts.net"; 50 sshUser = "colmena-deploy"; 51 system = "x86_64-linux"; 52 speedFactor = 2; 53 maxJobs = 6; 54 protocol = "ssh-ng"; 55 } 56 { 57 hostName = "skyline.axolotl-map.ts.net"; 58 sshUser = "colmena-deploy"; 59 system = "aarch64-linux"; 60 speedFactor = 1; 61 maxJobs = 2; 62 protocol = "ssh-ng"; 63 } 64 ]; 65 66 distributedBuilds = true; 67 68 gc = { 69 automatic = true; 70 options = "--delete-older-than 7d"; 71 interval.Weekday = 6; 72 }; 73 74 optimise.automatic = true; 75 76 settings = { 77 builders-use-substitutes = true; 78 experimental-features = "nix-command flakes"; 79 trusted-users = ["root" "ovy"]; 80 sandbox = true; 81 }; 82 }; 83 }; 84}