mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
got substituting to work along with remote building
This commit is contained in:
parent
7fd4c88056
commit
ee2beea680
2 changed files with 46 additions and 20 deletions
|
|
@ -16,6 +16,9 @@
|
||||||
keep-derivations = false;
|
keep-derivations = false;
|
||||||
builders-use-substitutes = true;
|
builders-use-substitutes = true;
|
||||||
max-jobs = 0;
|
max-jobs = 0;
|
||||||
|
substituters = ["ssh-ng://nix-ssh@gerg-desktop" "https://cache.nixos.org/"];
|
||||||
|
trusted-public-keys = ["gerg-desktop:6p1+h6jQnb1MOt3ra3PlQpfgEEF4zRrQWiEuAqcjBj8=" "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="];
|
||||||
|
secret-key-files = "/persist/cache-keys/cache-priv-key.pem";
|
||||||
};
|
};
|
||||||
distributedBuilds = true;
|
distributedBuilds = true;
|
||||||
buildMachines = [
|
buildMachines = [
|
||||||
|
|
@ -39,26 +42,42 @@
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
(lib.mkIf config.localModules.remoteBuild.isBuilder {
|
|
||||||
|
(
|
||||||
|
let
|
||||||
|
keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIq9YTf4jlVCKBKn44m4yJvj94C7pTOyaa4VjZFohNqD root@mom-laptop"
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJUKHZasYQUAmRBiqtx1drDxfq18/N4rKydCtPHx461I root@game-laptop"
|
||||||
|
];
|
||||||
|
in
|
||||||
|
lib.mkIf
|
||||||
|
config.localModules.remoteBuild.isBuilder
|
||||||
|
{
|
||||||
users = {
|
users = {
|
||||||
groups.builder = {};
|
groups.builder = {};
|
||||||
users.builder = {
|
users.builder = {
|
||||||
createHome = false;
|
createHome = false;
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys = {inherit keys;};
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIq9YTf4jlVCKBKn44m4yJvj94C7pTOyaa4VjZFohNqD root@mom-laptop"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJUKHZasYQUAmRBiqtx1drDxfq18/N4rKydCtPHx461I root@game-laptop"
|
|
||||||
];
|
|
||||||
useDefaultShell = true;
|
useDefaultShell = true;
|
||||||
group = "builder";
|
group = "builder";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nix.settings = {
|
nix = {
|
||||||
trusted-users = ["builder"];
|
settings = {
|
||||||
|
trusted-users = ["builder" "nix-ssh"];
|
||||||
keep-outputs = true;
|
keep-outputs = true;
|
||||||
keep-derivations = true;
|
keep-derivations = true;
|
||||||
};
|
};
|
||||||
})
|
sshServe = {
|
||||||
|
enable = true;
|
||||||
|
write = true;
|
||||||
|
inherit keys;
|
||||||
|
protocol = "ssh-ng";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
)
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -74,4 +74,11 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{
|
||||||
|
device = "/swapfile";
|
||||||
|
size = 8 * 1024;
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue