Refactor git ssh signing
This commit is contained in:
parent
3df790a53c
commit
7d45b0584a
|
@ -74,6 +74,16 @@ with lib; {
|
|||
signByDefault = lib.mkDefault config.nathan.programs.util.git.gpgSign;
|
||||
};
|
||||
})
|
||||
(mkIf (config.nathan.programs.util.git.enable
|
||||
&& config.nathan.programs.util.git.sshSign) {
|
||||
programs.git = {
|
||||
extraConfig = {
|
||||
commit.gpgsign = true;
|
||||
gpg.format = "ssh";
|
||||
user.signingkey = "~/.ssh/id_ed25519.pub";
|
||||
};
|
||||
};
|
||||
})
|
||||
(mkIf config.nathan.programs.util.git.enable {
|
||||
# Git adjacent packages
|
||||
home.packages = [
|
||||
|
|
|
@ -22,6 +22,7 @@ with nLib; {
|
|||
enable = mkEnableOptionT "git";
|
||||
gpgSign =
|
||||
mkDefaultOption "git signatures" config.nathan.config.isDesktop;
|
||||
sshSign = mkDefaultOption "git ssh signatures" false;
|
||||
};
|
||||
# Bat configuration, enabled by default
|
||||
bat = mkEnableOptionT "bat";
|
||||
|
|
|
@ -7,7 +7,10 @@
|
|||
programs = {
|
||||
media.enable = false;
|
||||
util = { wine = true; };
|
||||
git = { gpgSign = false; };
|
||||
git = {
|
||||
gpgSign = false;
|
||||
sshSign = true;
|
||||
};
|
||||
# games = { launcher = true; };
|
||||
# media.nicotineService = true;
|
||||
};
|
||||
|
@ -60,13 +63,4 @@
|
|||
# Lock mako notifs to main display
|
||||
output = "Virtual-1";
|
||||
};
|
||||
|
||||
# Setup git commit signing with ssh key
|
||||
programs.git = {
|
||||
extraConfig = {
|
||||
commit.gpgsign = true;
|
||||
gpg.format = "ssh";
|
||||
user.signingkey = "~/.ssh/id_ed25519.pub";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -9,7 +9,10 @@
|
|||
};
|
||||
};
|
||||
programs = {
|
||||
util = { productivity = true; };
|
||||
util = {
|
||||
productivity = true;
|
||||
git.sshSign = true;
|
||||
};
|
||||
devel = {
|
||||
core = true;
|
||||
rust = true;
|
||||
|
@ -22,12 +25,4 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
# Setup git commit signing with ssh key
|
||||
programs.git = {
|
||||
extraConfig = {
|
||||
commit.gpgsign = true;
|
||||
gpg.format = "ssh";
|
||||
user.signingkey = "~/.ssh/id_ed25519.pub";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue