Nix configurations for my personal machines (Linux & macOS)
at main 1.9 kB view raw
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 warn-dirty = false; 38 }; 39 }; 40 41 system.tools.nixos-option.enable = false; 42 }; 43 44 darwin.always = { 45 nixpkgs.config = import ../files/nixpkgs-config.nix; 46 47 nix = { 48 buildMachines = [ 49 { 50 hostName = "rushing.axolotl-map.ts.net"; 51 sshUser = "colmena-deploy"; 52 system = "x86_64-linux"; 53 speedFactor = 2; 54 maxJobs = 6; 55 protocol = "ssh-ng"; 56 } 57 { 58 hostName = "skyline.axolotl-map.ts.net"; 59 sshUser = "colmena-deploy"; 60 system = "aarch64-linux"; 61 speedFactor = 1; 62 maxJobs = 2; 63 protocol = "ssh-ng"; 64 } 65 ]; 66 67 distributedBuilds = true; 68 69 gc = { 70 automatic = true; 71 options = "--delete-older-than 7d"; 72 interval.Weekday = 6; 73 }; 74 75 optimise.automatic = true; 76 77 settings = { 78 builders-use-substitutes = true; 79 experimental-features = "nix-command flakes"; 80 trusted-users = ["root" "ovy"]; 81 sandbox = true; 82 warn-dirty = false; 83 }; 84 }; 85 }; 86}