Fix the result of an unexpected logic change for users.users.x.openssh.authorizedKeys.keys
This commit is contained in:
parent
f7a5d246b3
commit
87087a3f39
11
sshusers.nix
11
sshusers.nix
|
@ -18,7 +18,16 @@ let
|
||||||
sha512 = "034d5y75wr8vyz3r222hxar1wm0vmqryvgcji2lh1f8jxpgs3nchb0w2qv44msz085s9p4i92s96z9cb8zapmwj3anm0p8f156pf34c";
|
sha512 = "034d5y75wr8vyz3r222hxar1wm0vmqryvgcji2lh1f8jxpgs3nchb0w2qv44msz085s9p4i92s96z9cb8zapmwj3anm0p8f156pf34c";
|
||||||
};
|
};
|
||||||
getpubkeys = user: builtins.readFile "${sshkeys}/${user}.pub";
|
getpubkeys = user: builtins.readFile "${sshkeys}/${user}.pub";
|
||||||
mkuser = user: { name = user; isNormalUser = true; extraGroups = [ "wheel" ]; initialPassword = "test1234"; openssh.authorizedKeys.keys = [ (getpubkeys user) ]; };
|
mkuser = user: {
|
||||||
|
name = user;
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [ "wheel" ];
|
||||||
|
createHome = true;
|
||||||
|
initialPassword = "test1234";
|
||||||
|
openssh.authorizedKeys.keys = (
|
||||||
|
lib.splitString "\n" (getpubkeys user)
|
||||||
|
);
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
users.users = (lib.genAttrs [ "tokudan" "Entil_Zha" "alexander" "kantorkel" ] mkuser) // {
|
users.users = (lib.genAttrs [ "tokudan" "Entil_Zha" "alexander" "kantorkel" ] mkuser) // {
|
||||||
|
|
Loading…
Reference in a new issue