nix/user/Root.nix

26 lines
405 B
Nix
Raw Normal View History

{
2024-11-04 04:37:29 +03:00
config,
lib,
secret,
util,
...
}: let
2024-11-16 06:38:48 +03:00
cfg = config.user;
2024-11-04 04:37:29 +03:00
in {
2024-11-16 06:38:48 +03:00
options.user.root = lib.mkEnableOption "root.";
2024-11-16 06:38:48 +03:00
config = lib.mkIf cfg.root {
2024-11-04 04:37:29 +03:00
users.users.root.hashedPassword = secret.hashedPassword;
home.nixos.users = [{
homeDirectory = "/root";
username = "root";
}];
security.sudo = {
enable = false;
extraConfig = util.trimTabs ''
Defaults rootpw
'';
};
};
}