nix/home/user/Root.nix

24 lines
407 B
Nix
Raw Normal View History

{ lib
, config
, secret
, ... }: with lib; let
cfg = config.user.root;
in {
options = {
user.root = {
2024-08-24 19:59:18 +03:00
enable = mkEnableOption "root";
};
};
config = mkIf cfg.enable {
home.nixos.users = [{ username = "root"; homeDirectory = "/root"; }];
users.users.root.hashedPassword = secret.hashedPassword;
security.sudo = {
enable = false;
extraConfig = ''
Defaults rootpw
'';
};
};
}