Add known_hosts support in SSH secrets
• Append known_hosts file generation using defined SSH entries • Change knownHosts type from attribute set to list for simplicity
This commit is contained in:
parent
37f1082010
commit
ad2b8951e6
2 changed files with 5 additions and 3 deletions
|
@ -42,6 +42,8 @@ in
|
|||
chmod 400 $HOME/.ssh/config
|
||||
'';
|
||||
};
|
||||
|
||||
".ssh/known_hosts".text = lib.concatStringsSep "\n" secretsSpec.ssh.knownHosts;
|
||||
}
|
||||
# Dynamically add all SSH private keys using the existing store paths
|
||||
# Ensures the keys have correct permissions and are not symlinks
|
||||
|
|
|
@ -42,9 +42,9 @@ in
|
|||
default = { };
|
||||
};
|
||||
knownHosts = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.str;
|
||||
description = "SSH known hosts entries keyed by hostname";
|
||||
default = { };
|
||||
type = lib.types.listOf lib.types.str;
|
||||
description = "SSH known hosts entries";
|
||||
default = [ ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue