nix/user/Root.nix
2024-11-06 01:07:30 +03:00

28 lines
428 B
Nix

{
config,
lib,
secret,
util,
...
}: let
cfg = config.user.root;
in {
options.user.root = {
enable = lib.mkEnableOption "root";
};
config = lib.mkIf cfg.enable {
users.users.root.hashedPassword = secret.hashedPassword;
home.nixos.users = [{
homeDirectory = "/root";
username = "root";
}];
security.sudo = {
enable = false;
extraConfig = util.trimTabs ''
Defaults rootpw
'';
};
};
}