Added nutboy3 and nuttyclub
This commit is contained in:
@@ -7,15 +7,21 @@ let
|
||||
try-attr = attr: set: if (hasAttr attr set) then set.${attr} else null;
|
||||
|
||||
in {
|
||||
config = mkIf has-secret-files {
|
||||
fudo.secrets.host-secrets.${hostname} = let
|
||||
keytab-file = try-attr hostname config.fudo.secrets.files.host-keytabs;
|
||||
in mkIf (keytab-file != null) {
|
||||
host-keytab = {
|
||||
source-file = keytab-file;
|
||||
target-file = "/etc/krb5.keytab";
|
||||
user = "root";
|
||||
};
|
||||
config = mkIf has-secret-files (let
|
||||
keytab-file = try-attr hostname config.fudo.secrets.files.host-keytabs;
|
||||
in {
|
||||
environment.etc."krb5.keytab" = mkIf (keytab-file != null) {
|
||||
source =
|
||||
config.fudo.secrets.host-secrets.${hostname}.host-keytab.target-file;
|
||||
user = "root";
|
||||
group = "root";
|
||||
mode = "0400";
|
||||
};
|
||||
};
|
||||
|
||||
fudo.secrets.host-secrets.${hostname}.host-keytab = mkIf (keytab-file != null) {
|
||||
source-file = keytab-file;
|
||||
target-file = "/run/kerberos/krb5.keytab";
|
||||
user = "root";
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ in {
|
||||
(map
|
||||
(keypair: nameValuePair "host-${keypair.key-type}-private-key" {
|
||||
source-file = keypair.private-key;
|
||||
target-file = "/var/run/ssh/private/host-${keypair.key-type}-private-key";
|
||||
target-file = "/run/openssh/private/host-${keypair.key-type}-private-key";
|
||||
user = "root";
|
||||
})
|
||||
host-keypairs);
|
||||
@@ -52,8 +52,11 @@ in {
|
||||
}) config.fudo.secrets.files.host-ssh-keypairs);
|
||||
};
|
||||
|
||||
services.openssh.hostKeys = map (keypair: {
|
||||
path = "/var/run/ssh/private/host-${keypair.key-type}-private-key";
|
||||
services.openssh.hostKeys = let
|
||||
host-secrets = config.fudo.secrets.host-secrets.${hostname};
|
||||
in map (keypair: {
|
||||
path =
|
||||
host-secrets."host-${keypair.key-type}-private-key".target-file;
|
||||
type = keypair.key-type;
|
||||
}) host-keypairs;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user