Builder sur cephiroth

cephiroth-v3
Pyjacpp 2026-11-21 16:21:48 +01:00
parent df4c48707b
commit 82fe0add92
No known key found for this signature in database
GPG Key ID: ED479A5A26930939
5 changed files with 26 additions and 2 deletions

View File

@ -0,0 +1,18 @@
{ lib, hosts, ... }:
let
inherit (lib)
attrValues
concatMap
optional
;
in
{
nix.trustedUsers = [ "builder" ];
users.users.builder = {
isSystemUser = true;
# On autorise les clés publiques des VMs à se connecter.
openssh.authorizedKeys.keys = concatMap (c: optional (c.publicSsh != null) c.publicSsh) (
attrValues hosts
);
};
}

View File

@ -5,6 +5,7 @@
./hardware-configuration.nix ./hardware-configuration.nix
./networking.nix ./networking.nix
./ceph.nix ./ceph.nix
./builder.nix
]; ];
networking.hostId = "bbdd1133"; networking.hostId = "bbdd1133";

View File

@ -25,5 +25,7 @@
nginx.enable = true; nginx.enable = true;
}; };
publicSsh = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEVfKNokHG6ig32hhQxTep+fKFmKahlDClPrX/dP4/gb root@livre";
resticClient.when = "03:45"; resticClient.when = "03:45";
} }

View File

@ -12,5 +12,7 @@
}; };
}; };
publicSsh = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPpaGf8A+XWXBdNrs69RiC0qPbjPHdtkl31OjxrktmF6 root@two";
resticClient.when = "07:29"; resticClient.when = "07:29";
} }

View File

@ -35,8 +35,9 @@ in
default = false; default = false;
}; };
public-ssh = mkOption { publicSsh = mkOption {
type = types.str; type = types.nullOr types.str;
default = null;
description = "Clé ssh publique de la machine."; description = "Clé ssh publique de la machine.";
}; };
}; };