root-password: fix password-store support

This commit is contained in:
Jörg Thalheim
2024-07-21 17:57:13 +02:00
parent faf0528be2
commit 16d25ab6e8

View File

@@ -1,9 +1,18 @@
{ pkgs, config, ... }:
{
pkgs,
config,
lib,
...
}:
{
users.mutableUsers = false;
users.users.root.hashedPasswordFile =
config.clan.core.facts.services.root-password.secret.password-hash.path;
sops.secrets."${config.clan.core.machineName}-password-hash".neededForUsers = true;
sops.secrets."${config.clan.core.machineName}-password-hash".neededForUsers = lib.mkIf (
config.clan.core.facts.secretStore == "sops"
) true;
clan.core.facts.services.root-password = {
secret.password = { };
secret.password-hash = { };