added users that can be disabled
This commit is contained in:
parent
9418b91b4d
commit
eda1db9136
6 changed files with 193 additions and 94 deletions
30
users/remote/default.nix
Normal file
30
users/remote/default.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.users.remote;
|
||||
in
|
||||
{
|
||||
options.users.remote = {
|
||||
isNormalUser = lib.mkEnableOption "remote";
|
||||
};
|
||||
|
||||
config.users = {
|
||||
groups.remote = {};
|
||||
|
||||
users.remote = lib.mkMerge [
|
||||
{
|
||||
uid = 2000;
|
||||
group = "remote";
|
||||
}
|
||||
|
||||
(
|
||||
if cfg.isNormalUser then {
|
||||
# extraGroups = [ "wheel" ];
|
||||
isNormalUser = true;
|
||||
openssh.authorizedKeys.keys = [];
|
||||
} else {
|
||||
isSystemUser = true;
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue