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