forked from mirrors/nixpkgs
nixos/programs/ssh: allow specifying known host CAs
This commit is contained in:
parent
104f8a0e1a
commit
1c9a2d4d7f
|
@ -21,7 +21,7 @@ let
|
||||||
|
|
||||||
knownHostsText = (flip (concatMapStringsSep "\n") knownHosts
|
knownHostsText = (flip (concatMapStringsSep "\n") knownHosts
|
||||||
(h: assert h.hostNames != [];
|
(h: assert h.hostNames != [];
|
||||||
concatStringsSep "," h.hostNames + " "
|
optionalString h.certAuthority "@cert-authority " + concatStringsSep "," h.hostNames + " "
|
||||||
+ (if h.publicKey != null then h.publicKey else readFile h.publicKeyFile)
|
+ (if h.publicKey != null then h.publicKey else readFile h.publicKeyFile)
|
||||||
)) + "\n";
|
)) + "\n";
|
||||||
|
|
||||||
|
@ -128,6 +128,14 @@ in
|
||||||
default = {};
|
default = {};
|
||||||
type = types.loaOf (types.submodule ({ name, ... }: {
|
type = types.loaOf (types.submodule ({ name, ... }: {
|
||||||
options = {
|
options = {
|
||||||
|
certAuthority = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
This public key is an SSH certificate authority, rather than an
|
||||||
|
individual host's key.
|
||||||
|
'';
|
||||||
|
};
|
||||||
hostNames = mkOption {
|
hostNames = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
|
|
Loading…
Reference in a new issue