diff --git a/machine/nucturne/default.nix b/machine/nucturne/default.nix index 2e6ab48..90c866e 100644 --- a/machine/nucturne/default.nix +++ b/machine/nucturne/default.nix @@ -3,6 +3,7 @@ variables= { hostName = "nucturne"; graphical = true; + git.signDefault = true; }; boot.extraModulePackages = [ diff --git a/machine/stel-xps/default.nix b/machine/stel-xps/default.nix index 80e4043..722b378 100644 --- a/machine/stel-xps/default.nix +++ b/machine/stel-xps/default.nix @@ -5,8 +5,11 @@ variables = { hostName = "stel-xps"; graphical = true; - git.key = "0x4998BEEE"; - git.gpgsm = true; + git = { + key = "0x4998BEEE"; + gpgsm = true; + signDefault = true; + }; }; #networking.hostName = "stel-xps"; # define the hostname diff --git a/options.nix b/options.nix index 1a70a16..1534502 100644 --- a/options.nix +++ b/options.nix @@ -29,6 +29,11 @@ default = false; description = "Whether to use gpgsm for commit signatures"; }; + signDefault = mkOption { + type = types.bool; + default = false; + description = "Whether to force signing commits or not"; + }; }; }; } diff --git a/users/ellmau/git.nix b/users/ellmau/git.nix index ae2a851..43d5370 100644 --- a/users/ellmau/git.nix +++ b/users/ellmau/git.nix @@ -17,7 +17,10 @@ # format = "x509"; # program = "gpgsm"; #}; - user = { signingKey = config.variables.git.key; }; + user = { + signingKey = config.variables.git.key; + signByDefault = config.variables.git.signDefault; + }; init = { defaultBranch = "main";}; branch = { autosetuprebase = "always";}; safe.directory = [ "/etc/nixos" ];