nixos/modules/users/root.nix

14 lines
372 B
Nix
Raw Normal View History

{ bootstrape ? false }: { pkgs, ... }@inputs:
2023-06-09 20:54:03 +08:00
{
config =
{
users =
{
users.root = { shell = inputs.pkgs.zsh; }
// (if bootstrape then { password = "0"; }
else { passwordFile = inputs.config.sops.secrets."password/root".path; });
2023-06-09 20:54:03 +08:00
mutableUsers = false;
};
} // (if !bootstrape then { sops.secrets."password/root".neededForUsers = true; } else {});
2023-06-09 20:54:03 +08:00
}