grace/dots
dotfiles/nix configs
git clone https://git.gae.moe/grace/dots
c1be8e3
main
1{ lib , ...} : 2let 3host = import ./hosts.nix ; 4sources = import ./sources.nix ; 5in 6assert lib . assertMsg ( 7host . type != "home" 8) " ${ host . name } is a Home Manager host; use home-manager instead." ; 9{ 10imports = [ 11( ./hosts + "/ ${ host . name } .nix" ) 12] 13++ lib . optional ( host . type == "nixos" ) ( ./hosts/hardware-configurations + "/ ${ host . name } .nix" ); 14 15nixpkgs . hostPlatform = host . system ; 16nixpkgs . pkgs = import sources . nixpkgs { 17system = host . system ; 18config . allowUnfree = true ; 19}; 20nix . nixPath = [ 21"nixpkgs= ${ sources . nixpkgs } " 22"home-manager= ${ sources . home-manager } " 23"nixos-config=/etc/nixos/configuration.nix" 24"darwin-config=/etc/nix-darwin/configuration.nix" 25]; 26 27nix . distributedBuilds = host . name != "dijkstra" ; 28nix . buildMachines = lib . optional ( host . name != "dijkstra" ) { 29hostName = "dijkstra.i.gae.moe" ; 30sshUser = "builder" ; 31protocol = "ssh-ng" ; 32systems = [ "x86_64-linux" ]; 33maxJobs = 8 ; 34speedFactor = 1 ; 35supportedFeatures = [ 36"kvm" 37"big-parallel" 38"nixos-test" 39"benchmark" 40]; 41}; 42nix . settings . builders-use-substitutes = true ; 43 44security . sudo . extraConfig = '' 45Defaults env_keep += "NIX_HOST" 46'' 47+ lib . optionalString ( host . type == "nixos" ) '' 48Defaults env_keep += "XDG_CONFIG_HOME EDITOR VISUAL JJ_CONFIG" 49'' ; 50}