nixconf/modules/nixos/user/default.nix
Bailey 4d3c2bb6da Initializes git-crypt.
Just testing using pubkey files, will add nebula certs later.
2024-03-04 17:51:04 -05:00

41 lines
776 B
Nix

{
config,
lib,
pkgs,
inputs,
...
}:
let
inherit (lib) types;
cfg = config.mtxyz.user;
in {
options.mtxyz.user = {
extraGroups = lib.mkOption {
type = (types.listOf types.str);
default = [ ];
};
extraOptions = lib.mkOption {
type = types.attrs;
default = { };
};
name = lib.mkOption {
type = types.str;
default = "mtxyz";
};
};
config = {
users.users.${cfg.name} = {
openssh.authorizedKeys.keyFiles = [
"${inputs.self}/secrets/authorized_keys"
];
isNormalUser = true;
extraGroups = [ "wheel" "dialout" ] ++ cfg.extraGroups;
initialPassword = "";
} // cfg.extraOptions;
users.defaultUserShell = pkgs.fish;
programs.fish.enable = true;
};
}