Enable the build VM as a substituter.
This should enable me to have local build jobs without rebuilding stuff that already exists on the build VM server.
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
additional_config = {
|
||||
speedFactor = 2;
|
||||
};
|
||||
substituter_url = "ssh-ng://nixworker@ns1.fizz.buzz:65122?compress=true&ssh-key=/persist/manual/ssh/root/keys/id_ed25519&remote-store=local?root=/.disk/root";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -129,6 +129,8 @@
|
||||
# systemd.user.extraConfig = "DefaultLimitNOFILE=8192";
|
||||
# systemd.services."user@11400".serviceConfig.LimitNOFILE = "8192";
|
||||
|
||||
nix.settings.secret-key-files = [ "/persist/manual/nix/nix-cache-key.sec" ];
|
||||
|
||||
me.build_in_ram.enable = true;
|
||||
me.dont_use_substituters.enable = true;
|
||||
me.hydra.enable = true;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
additional_config = {
|
||||
speedFactor = 2;
|
||||
};
|
||||
substituter_url = "ssh-ng://nixworker@ns1.fizz.buzz:65122?compress=true&ssh-key=/persist/manual/ssh/root/keys/id_ed25519&remote-store=local?root=/.disk/root";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
additional_config = {
|
||||
speedFactor = 2;
|
||||
};
|
||||
substituter_url = "ssh-ng://nixworker@ns1.fizz.buzz:65122?compress=true&ssh-key=/persist/manual/ssh/root/keys/id_ed25519&remote-store=local?root=/.disk/root";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
additional_config = {
|
||||
speedFactor = 2;
|
||||
};
|
||||
substituter_url = "ssh-ng://nixworker@ns1.fizz.buzz:65122?compress=true&ssh-key=/persist/manual/ssh/root/keys/id_ed25519&remote-store=local?root=/.disk/root";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -59,25 +59,16 @@ let
|
||||
hostName = lib.mkForce "hydra?remote-store=local?root=/.disk/root";
|
||||
};
|
||||
};
|
||||
joined_configs =
|
||||
lib.genAttrs
|
||||
(builtins.filter (hostname: config.me.distributed_build.machines."${hostname}".enable) (
|
||||
builtins.attrNames all_nixos_configs
|
||||
))
|
||||
(
|
||||
hostname:
|
||||
(lib.mkMerge [
|
||||
{
|
||||
hostName = hostname;
|
||||
sshUser = "nixworker";
|
||||
sshKey = "/persist/manual/ssh/root/keys/id_ed25519";
|
||||
maxJobs = 1;
|
||||
supportedFeatures = all_nixos_configs."${hostname}".config.me.optimizations.system_features;
|
||||
}
|
||||
static_host_configs."${hostname}"
|
||||
config.me.distributed_build.machines."${hostname}".additional_config
|
||||
])
|
||||
);
|
||||
substituters_list = (
|
||||
map (
|
||||
hostname:
|
||||
(lib.mkIf (
|
||||
config.me.distributed_build.machines."${hostname}".enable
|
||||
&& config.me.distributed_build.machines."${hostname}".substituter_url != null
|
||||
) (config.me.distributed_build.machines."${hostname}".substituter_url))
|
||||
) (builtins.attrNames all_nixos_configs)
|
||||
);
|
||||
has_any_substituters = substituters_list != [ ];
|
||||
in
|
||||
{
|
||||
imports = [ ];
|
||||
@@ -117,6 +108,7 @@ in
|
||||
"odo:0S/XKSFjjIrihQ7lbHEIebXk/c/xuoodhm0Gz26YhjA="
|
||||
"odowork:zg3UKBAyLy3xtZkL0hMtbxHjxgn5A2QY8NNAgyRT6Yo="
|
||||
"quark:Eb6ygkIiVlcUqb5hOjEVIQcfYLpCz40YVYA3/rxrgBc="
|
||||
"hydra:1s4Cy9YJLgw4jWx5jdSCfJmIm0hfya7WEy/EwJYI5Ys="
|
||||
];
|
||||
}
|
||||
{
|
||||
@@ -140,12 +132,10 @@ in
|
||||
) (builtins.attrNames all_nixos_configs)
|
||||
);
|
||||
}
|
||||
# {
|
||||
# nix.settings.substitute = lib.mkForce true;
|
||||
# nix.settings.substituters = lib.mkForce (
|
||||
# lib.mapAttrsToList (hostname: joined_config: "ssh-ng://${joined_config.hostName}") joined_configs
|
||||
# );
|
||||
# }
|
||||
(lib.mkIf has_any_substituters {
|
||||
nix.settings.substitute = lib.mkForce true;
|
||||
nix.settings.substituters = lib.mkForce substituters_list;
|
||||
})
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user