Common/nix: add remote builder
This commit is contained in:
parent
68628028bd
commit
30f41d10db
1 changed files with 30 additions and 1 deletions
|
|
@ -1,9 +1,38 @@
|
|||
{systemPkgs, ...}: {
|
||||
{
|
||||
systemPkgs,
|
||||
config,
|
||||
flakeSelf,
|
||||
...
|
||||
}: {
|
||||
age.secrets = {
|
||||
remoteBuilderKey.file = "${flakeSelf.inputs.secrets}/WinMax2/nixrbld-private-key.age";
|
||||
};
|
||||
|
||||
programs.ssh = {
|
||||
knownHosts.winmax2.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPE+ksvEq/I2LMLOztVXpLE9yuI6EkRh4EtXdlYkhl6C WinMax2 host key";
|
||||
extraConfig = ''
|
||||
Host nixrbld
|
||||
HostName winmax2
|
||||
IdentitiesOnly yes
|
||||
IdentityFile ${config.age.secrets.remoteBuilderKey.path}
|
||||
User nixrbld
|
||||
'';
|
||||
};
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = "nix-command flakes";
|
||||
};
|
||||
distributedBuilds = true;
|
||||
buildMachines = [
|
||||
{
|
||||
hostName = "nixrbld";
|
||||
system = "x86_64-linux";
|
||||
protocol = "ssh-ng";
|
||||
maxJobs = 4;
|
||||
}
|
||||
];
|
||||
optimise = {
|
||||
automatic = true;
|
||||
dates = ["weekly"];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue