nixcfg/modules/nixos/user/rialo/default.nix

35 lines
630 B
Nix

{
config,
pkgs,
lib,
...
}:
with lib;
with lib.metacfg;
let
cfg = config.metacfg.user.rialo;
in
{
options.metacfg.user.rialo = with types; {
enable = mkBoolOpt false "Whether or not to enable the rialo user.";
};
config = mkIf cfg.enable {
users.users.rialo = {
isNormalUser = true;
home = "/home/rialo";
group = "users";
shell = pkgs.bash;
uid = 1001;
extraGroups = [
"wheel"
"docker"
"dialout"
"tss"
];
openssh.authorizedKeys.keys = config.metacfg.user.sshKeys;
};
nix.settings.trusted-users = [ "rialo" ];
};
}