forked from pub-solar/os
modules: user: add publicKeys option
This commit is contained in:
parent
19bf284361
commit
af6c13f3e6
|
@ -21,6 +21,11 @@ in
|
|||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
};
|
||||
publicKeys = mkOption {
|
||||
description = "User SSH public keys";
|
||||
type = types.listOf types.path;
|
||||
default = [ ];
|
||||
};
|
||||
fullName = mkOption {
|
||||
description = "User full name";
|
||||
type = types.nullOr types.str;
|
||||
|
|
|
@ -19,6 +19,7 @@ in
|
|||
extraGroups = [ "wheel" "docker" "input" "audio" "video" "networkmanager" "lp" "scanner" ];
|
||||
initialHashedPassword = if psCfg.user.password != null then psCfg.user.password else "";
|
||||
shell = pkgs.zsh;
|
||||
openssh.authorizedKeys.keyFiles = if psCfg.user.publicKeys != null then psCfg.user.publicKeys else [];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue