nix-configs/modules/system/user.nix
Lucy Hochkamp f7afa33a13
Some checks failed
ci/woodpecker/push/build-cache Pipeline failed
ci/woodpecker/cron/dependency-pr Pipeline was successful
update
2025-10-23 16:38:51 +02:00

43 lines
866 B
Nix

{
pkgs,
config,
lib,
...
}:
let
cfg = config.xyno.system.user;
in
{
options.xyno.system.user.enable = lib.mkEnableOption "enable a user with xynos config";
options.xyno.system.user.name = lib.mkOption {
type = lib.types.str;
default = "xyno";
};
config = lib.mkIf cfg.enable {
environment.homeBinInPath = true;
nix.settings.trusted-users = [cfg.name];
users.groups.plugdev = {};
users.users.${cfg.name} = {
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID/oMAi5jyQsNohfhcSH2ItisTpBGB0WtYTVxJYKKqhj"]; # theseus
isNormalUser = true;
uid = 1000;
extraGroups = [
"wheel"
"cdrom"
"networkmanager"
"video"
"netdev"
"plugdev"
"dialout"
"tape"
"uucp"
"wireshark"
"lock"
];
};
};
}