This commit is contained in:
2023-07-04 16:32:09 +02:00
parent 6dcd96551b
commit 51575e020e
8 changed files with 38 additions and 1 deletions
+14
View File
@@ -131,6 +131,11 @@ let
programs.ssh.knownHosts.${proxy.host or "IGNORE"} = lib.mkIf (proxy != null) { publicKey = proxy.publicKey; };
};
remoteMap = lib.listToAttrs (lib.forEach remotes (remote: {
name = remote.hostName;
value = remote;
}));
in {
nix.distributedBuilds = true;
@@ -141,6 +146,15 @@ in {
# useful when the builder has a faster internet connection than i do
nix.settings.builders-use-substitutes = true;
/** /
nix.buildMachines = let cfg = remoteMap.${config.networking.fqdn}; in [{
hostName = "localhost"; # https://github.com/NixOS/nix/pull/4938
systems = [ config.nixpkgs.system "builtin" ] ++ config.boot.binfmt.emulatedSystems;
supportedFeatures = ["builtin" "local" "kvm" "nixos-test" "big-parallel" "benchmark"];
inherit (cfg) maxJobs speedFactor;
}];
/**/
# TIL: this can be a list of configurations and lambdas, not just file paths
imports = builtins.map mkRemoteConfig remotes;