added users that can be disabled

This commit is contained in:
Leyla Becker 2024-03-10 17:26:25 -05:00
parent 9418b91b4d
commit eda1db9136
6 changed files with 193 additions and 94 deletions

30
users/remote/default.nix Normal file
View 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;
}
)
];
};
}