nixcfg/modules/nixos/user/rialo/default.nix
Harald Hoyer e3d00e650c refactor: share rialo user as a reusable nixos module
Extract the per-host rialo user definition into a Snowfall module
(metacfg.user.rialo.enable) so it can be shared across hosts instead of
copy-pasting the file. Enable it on both amd and x1.
2026-05-27 13:46:56 +02:00

34 lines
565 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"
];
};
nix.settings.trusted-users = [ "rialo" ];
};
}