Skip to content

Commit

Permalink
tweak(modules): programs: git: set default signing.key -> null
Browse files Browse the repository at this point in the history
When the value is `null`,
the default signing key is inferred from the Git user's email.
  • Loading branch information
gekoke committed Jan 2, 2025
1 parent f4c1ea2 commit 02a3a61
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion modules/nixos/programs/git/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ in
enable = mkEnableOption "git version control";
userName = mkOpt str user.accounts.fullName "The name to configure git with";
userEmail = mkOpt str user.accounts.primaryEmailAddress "The email to configure git with";
signingKey = mkOpt (nullOr str) "1E9AFDF3275F99EE" "The key ID to sign commits with";
signingKey = mkOption {
description = "The key ID to sign commits with";
type = nullOr str;
default = null;
};
signByDefault = mkOpt bool true "Whether to sign Git commits using GPG";
githubUsername = mkOpt str "gekoke" "The GitHub username to use";
};
Expand Down
1 change: 1 addition & 0 deletions systems/x86_64-linux/carbon/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
hardware.nvidia.enable = true;
roles.workstation.enable = true;
secrets.enable = true;
programs.git.signingKey = "1E9AFDF3275F99EE";
};

home-manager.users.geko = {
Expand Down
1 change: 0 additions & 1 deletion systems/x86_64-linux/silicon/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ in
programs = {
git = enabled // {
userEmail = "[email protected]";
signingKey = "FB5F09CB29F94BC5";
};
ssh = enabled;
emacs = enabled // {
Expand Down

0 comments on commit 02a3a61

Please sign in to comment.