home(auth): add git commit signing configuration
This commit is contained in:
parent
170d21f926
commit
ef99391f45
2 changed files with 32 additions and 0 deletions
25
home/auth/home.nix
Normal file
25
home/auth/home.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
{ pkgs
|
||||||
|
, lib
|
||||||
|
, config
|
||||||
|
, ...}: with lib; {
|
||||||
|
# git signing configuration
|
||||||
|
programs.git = {
|
||||||
|
signing = {
|
||||||
|
signByDefault = true;
|
||||||
|
gpgPath = "${pkgs.openssh}/bin/ssh-keygen";
|
||||||
|
key = null;
|
||||||
|
};
|
||||||
|
|
||||||
|
extraConfig = {
|
||||||
|
user.signingkey = "~/.ssh/id_ed25519.pub";
|
||||||
|
gpg = {
|
||||||
|
format = "ssh";
|
||||||
|
# compiled from trusted keys in auth module
|
||||||
|
ssh.allowedSignersFile = toString (pkgs.writeText
|
||||||
|
"allowed_signers" (foldr (key: folded:
|
||||||
|
folded + "koishi@514fpv.one ${key}") ""
|
||||||
|
config.passthrough.publicKeys));
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
7
home/auth/nixos.nix
Normal file
7
home/auth/nixos.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ config
|
||||||
|
, ... }: {
|
||||||
|
# this module passes openssh public keys to home-manager
|
||||||
|
users.homeModules = [ {
|
||||||
|
passthrough.publicKeys = config.faucet.auth.openssh.publicKeys;
|
||||||
|
} ];
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue