mirror of
https://github.com/CHN-beta/nixos.git
synced 2024-10-23 20:08:44 +08:00
14 lines
372 B
Nix
14 lines
372 B
Nix
{ bootstrape ? false }: { pkgs, ... }@inputs:
|
|
{
|
|
config =
|
|
{
|
|
users =
|
|
{
|
|
users.root = { shell = inputs.pkgs.zsh; }
|
|
// (if bootstrape then { password = "0"; }
|
|
else { passwordFile = inputs.config.sops.secrets."password/root".path; });
|
|
mutableUsers = false;
|
|
};
|
|
} // (if !bootstrape then { sops.secrets."password/root".neededForUsers = true; } else {});
|
|
}
|