fix(auth): translate key list
This commit is contained in:
parent
5b6a1b9ddf
commit
315a76c2be
|
@ -7,6 +7,8 @@
|
||||||
builtins.readDir
|
builtins.readDir
|
||||||
(lib.filterAttrs (n: ty: ty == "regular"))
|
(lib.filterAttrs (n: ty: ty == "regular"))
|
||||||
(lib.mapAttrsToList (n: _: builtins.readFile ./pub/${n}))
|
(lib.mapAttrsToList (n: _: builtins.readFile ./pub/${n}))
|
||||||
|
(foldr (payload: keys: (splitString "\n" payload) ++ keys) [ ])
|
||||||
|
(foldr (candidate: keys: keys ++ (if candidate == "" then [ ] else [ candidate ])) [ ])
|
||||||
];
|
];
|
||||||
in {
|
in {
|
||||||
options.global.auth = {
|
options.global.auth = {
|
||||||
|
@ -15,7 +17,7 @@ in {
|
||||||
enable = mkEnableOption "openssh server";
|
enable = mkEnableOption "openssh server";
|
||||||
password = mkEnableOption "password authentication";
|
password = mkEnableOption "password authentication";
|
||||||
publicKeys = mkOption {
|
publicKeys = mkOption {
|
||||||
type = with types; listOf str;
|
type = with types; listOf singleLineStr;
|
||||||
default = pub;
|
default = pub;
|
||||||
description = "list of trusted openssh keys";
|
description = "list of trusted openssh keys";
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue