add remote builder for hs

This commit is contained in:
ant 2025-10-04 12:05:26 +02:00
parent cadc429c05
commit f7684f89c3
3 changed files with 34 additions and 0 deletions

View file

@ -9,6 +9,7 @@ in
../common.nix ../common.nix
../common-graphics.nix ../common-graphics.nix
(import ../remote-disk-unlock.nix ["igb"] sshKeys) (import ../remote-disk-unlock.nix ["igb"] sshKeys)
../builder.nix
]; ];
boot.loader = { boot.loader = {

19
os/builder.nix Normal file
View file

@ -0,0 +1,19 @@
{ config, pkgs, ... }:
let sshKeys = with (import ../sshKeys.nix); [
hs
];
in
{
users.users.remotebuild = {
isNormalUser = true;
createHome = false;
group = "remotebuild";
shell = pkgs.bash;
openssh.authorizedKeys.keys = sshKeys;
};
users.groups.remotebuild = {};
nix.settings.extra-trusted-users = [ "remotebuild" ];
}

View file

@ -143,4 +143,18 @@ in {
enable = true; enable = true;
secretKeyFile = "/var/cache-priv-key.pem"; secretKeyFile = "/var/cache-priv-key.pem";
}; };
nix.distributedBuilds = true;
nix.settings.builders-use-substitutes = true;
nix.buildMachines = [
{
hostName = "192.168.1.2";
protocol = "ssh-ng";
sshUser = "remotebuild";
sshKey = "/home/ant/.ssh/id_ed25519";
system = pkgs.stdenv.hostPlatform.system;
supportedFeatures = [ "nixos-test" "big-parallel" "kvm" ];
}
];
} }