Files

20 lines
412 B
Nix
Raw Permalink Normal View History

2026-08-20 22:03:24 +02:00
{
flake.modules.nixos.system-account-root = {
lib,
config,
pkgs,
...
}:
with lib; let
cfg = config.mySystem.users.root;
in {
options.mySystem.users.root.disablePassword = mkEnableOption "Disables root password";
config = {
users.users.root = {
hashedPassword = mkIf cfg.disablePassword "*";
shell = pkgs.zsh;
};
};
};
}