mirror of
https://github.com/nmasur/dotfiles
synced 2026-06-15 14:23:56 +00:00
sign git commits with work acct
This commit is contained in:
@@ -39,8 +39,19 @@ in
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
programs.git = {
|
||||
settings.user.name = lib.mkForce cfg.work.name;
|
||||
settings.user.email = lib.mkForce cfg.work.email;
|
||||
settings = {
|
||||
user = {
|
||||
name = lib.mkForce cfg.work.name;
|
||||
email = lib.mkForce cfg.work.email;
|
||||
signingKey = "~/.ssh/work_github";
|
||||
};
|
||||
commit = {
|
||||
gpgsign = true;
|
||||
};
|
||||
tag = {
|
||||
gpgsign = true;
|
||||
};
|
||||
};
|
||||
includes = [
|
||||
{
|
||||
path = "${config.home.homeDirectory}/${config.xdg.configFile."git/personal".target}";
|
||||
@@ -50,6 +61,11 @@ in
|
||||
|
||||
};
|
||||
|
||||
# Add work to signers file
|
||||
xdg.configFile."git/allowed-signers".text = ''
|
||||
${cfg.work.email} ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIP7aXbmKHmWUZgwG5HPtwx+nREVeMIRplpAAzxPOFXL
|
||||
'';
|
||||
|
||||
# Personal git config
|
||||
xdg.configFile."git/personal".text = lib.generators.toGitINI {
|
||||
user = {
|
||||
@@ -57,12 +73,6 @@ in
|
||||
email = cfg.personal.email;
|
||||
signingkey = "~/.ssh/id_ed25519";
|
||||
};
|
||||
commit = {
|
||||
gpgsign = true;
|
||||
};
|
||||
tag = {
|
||||
gpgsign = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Personal jj config
|
||||
|
||||
@@ -65,7 +65,7 @@ in
|
||||
};
|
||||
|
||||
xdg.configFile."git/allowed-signers".text = ''
|
||||
7386960+nmasur@users.noreply.github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s
|
||||
${config.nmasur.presets.programs.git.email} ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s
|
||||
'';
|
||||
|
||||
programs.fish.shellAbbrs = {
|
||||
|
||||
Reference in New Issue
Block a user