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 {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
settings.user.name = lib.mkForce cfg.work.name;
|
settings = {
|
||||||
settings.user.email = lib.mkForce cfg.work.email;
|
user = {
|
||||||
|
name = lib.mkForce cfg.work.name;
|
||||||
|
email = lib.mkForce cfg.work.email;
|
||||||
|
signingKey = "~/.ssh/work_github";
|
||||||
|
};
|
||||||
|
commit = {
|
||||||
|
gpgsign = true;
|
||||||
|
};
|
||||||
|
tag = {
|
||||||
|
gpgsign = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
includes = [
|
includes = [
|
||||||
{
|
{
|
||||||
path = "${config.home.homeDirectory}/${config.xdg.configFile."git/personal".target}";
|
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
|
# Personal git config
|
||||||
xdg.configFile."git/personal".text = lib.generators.toGitINI {
|
xdg.configFile."git/personal".text = lib.generators.toGitINI {
|
||||||
user = {
|
user = {
|
||||||
@@ -57,12 +73,6 @@ in
|
|||||||
email = cfg.personal.email;
|
email = cfg.personal.email;
|
||||||
signingkey = "~/.ssh/id_ed25519";
|
signingkey = "~/.ssh/id_ed25519";
|
||||||
};
|
};
|
||||||
commit = {
|
|
||||||
gpgsign = true;
|
|
||||||
};
|
|
||||||
tag = {
|
|
||||||
gpgsign = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Personal jj config
|
# Personal jj config
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile."git/allowed-signers".text = ''
|
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 = {
|
programs.fish.shellAbbrs = {
|
||||||
|
|||||||
Reference in New Issue
Block a user