refactor: schema

This commit is contained in:
2026-05-06 21:57:58 +02:00
parent c01c13aa50
commit 4b6e05212c
27 changed files with 198 additions and 377 deletions
+3 -2
View File
@@ -10,7 +10,7 @@ in
...
}:
let
machine = osConfig.meta.machine;
machine = osConfig.facts.machine;
allowedSignersFile = "${config.xdg.configHome}/git/allowed_signers";
mkScope =
@@ -19,6 +19,7 @@ in
email = account.emails.${scope}.address;
key = lib.attrByPath [ scope ] null machine.sshKeys;
hasSigningKey = key != null;
privateKeyPath = key.privateKeyPath or "~/.ssh/id_${scope}";
in
{
allowedSigners = lib.optional hasSigningKey "${email} ${key.publicKey}";
@@ -28,7 +29,7 @@ in
inherit email;
}
// lib.optionalAttrs hasSigningKey {
signingKey = "${key.privateKeyPath}.pub";
signingKey = "${privateKeyPath}.pub";
};
}
// lib.optionalAttrs hasSigningKey {