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
2aa4273c82
commit
d99f0ae9f7
2 changed files with 5 additions and 3 deletions
|
@ -42,6 +42,8 @@ in
|
||||||
chmod 400 $HOME/.ssh/config
|
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
|
# Dynamically add all SSH private keys using the existing store paths
|
||||||
# Ensures the keys have correct permissions and are not symlinks
|
# Ensures the keys have correct permissions and are not symlinks
|
||||||
|
|
|
@ -42,9 +42,9 @@ in
|
||||||
default = { };
|
default = { };
|
||||||
};
|
};
|
||||||
knownHosts = lib.mkOption {
|
knownHosts = lib.mkOption {
|
||||||
type = lib.types.attrsOf lib.types.str;
|
type = lib.types.listOf lib.types.str;
|
||||||
description = "SSH known hosts entries keyed by hostname";
|
description = "SSH known hosts entries";
|
||||||
default = { };
|
default = [ ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue