nix/user/Root.nix

28 lines
428 B
Nix
Raw Normal View History

{
2024-11-04 04:37:29 +03:00
config,
lib,
secret,
util,
...
}: let
cfg = config.user.root;
in {
options.user.root = {
enable = lib.mkEnableOption "root";
};
2024-11-04 04:37:29 +03:00
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
'';
};
};
}