nix/user/Root.nix
2024-11-16 06:38:48 +03:00

26 lines
405 B
Nix

{
config,
lib,
secret,
util,
...
}: 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 = util.trimTabs ''
Defaults rootpw
'';
};
};
}