nix-config/system/users/phundrak.nix

32 lines
753 B
Nix
Raw Normal View History

2025-05-04 02:47:36 +02:00
{
lib,
config,
pkgs,
...
}:
with lib; let
2025-07-05 00:02:39 +02:00
cfg = config.system.users;
2025-05-04 02:47:36 +02:00
in {
2025-07-05 00:02:39 +02:00
options.system.users = {
2025-05-04 02:47:36 +02:00
root.disablePassword = mkEnableOption "Disables root password";
2025-07-05 00:02:39 +02:00
phundrak.enable = mkEnableOption "Enables users phundrak";
2025-05-04 02:47:36 +02:00
};
config = {
users.users = {
root = {
hashedPassword = mkIf cfg.root.disablePassword "*";
shell = pkgs.zsh;
};
2025-07-05 00:02:39 +02:00
phundrak = mkIf cfg.phundrak.enable {
2025-05-04 02:47:36 +02:00
isNormalUser = true;
description = "Lucien Cartier-Tilet";
extraGroups = ["networkmanager" "wheel" "docker" "dialout" "podman"];
shell = pkgs.zsh;
openssh.authorizedKeys.keyFiles = lib.filesystem.listFilesRecursive ./keys;
2025-05-04 02:47:36 +02:00
};
};
programs.zsh.enable = true;
};
}