nix/user/Root.nix

29 lines
434 B
Nix

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