refactor
This commit is contained in:
@@ -1,23 +1,22 @@
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
account = config.repo.account;
|
||||
account = config.facts.account;
|
||||
in
|
||||
{
|
||||
flake.modules.homeManager.git =
|
||||
{
|
||||
config,
|
||||
osConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
machine = osConfig.facts.machine;
|
||||
machine = config.facts.machine;
|
||||
allowedSignersFile = "${config.xdg.configHome}/git/allowed_signers";
|
||||
|
||||
mkScope =
|
||||
scope:
|
||||
let
|
||||
email = account.emails.${scope}.address;
|
||||
key = lib.attrByPath [ scope ] null machine.sshKeys;
|
||||
key = machine.sshKeys.${scope} or null;
|
||||
hasSigningKey = key != null;
|
||||
privateKeyPath = key.privateKeyPath or "~/.ssh/id_${scope}";
|
||||
in
|
||||
|
||||
Reference in New Issue
Block a user