1
0
mirror of https://github.com/ellmau/nixos.git synced 2025-12-19 09:29:36 +01:00

ADD option for gpgsm/gpg

stel uses gpgsm, nucturne gpg
This commit is contained in:
Stefan Ellmauthaler 2022-01-11 11:31:16 +01:00
parent 1327b9524d
commit da67352452
Failed to extract signature
3 changed files with 21 additions and 2 deletions

View File

@ -5,6 +5,8 @@
variables = { variables = {
hostName = "stel-xps"; hostName = "stel-xps";
graphical = true; graphical = true;
git.key = "0x4998BEEE";
git.gpgsm = true;
}; };
#networking.hostName = "stel-xps"; # define the hostname #networking.hostName = "stel-xps"; # define the hostname

View File

@ -17,5 +17,18 @@
default = false; default = false;
description = "Whether this system is a server"; description = "Whether this system is a server";
}; };
git = {
key = mkOption {
type = types.str;
example = "0xBEEE1234";
default = "C804A9C1B7AF8256";
description = "Signkey for git commits";
};
gpgsm = mkOption {
type = types.bool;
default = false;
description = "Whether to use gpgsm for commit signatures";
};
};
}; };
} }

View File

@ -1,4 +1,4 @@
{ config, pkgs, ...}: { config, pkgs, lib, ...}:
{ {
home-manager.users.ellmau = { home-manager.users.ellmau = {
programs= { programs= {
@ -9,11 +9,15 @@
userEmail = "stefan.ellmauthaler@tu-dresden.de"; userEmail = "stefan.ellmauthaler@tu-dresden.de";
extraConfig = { extraConfig = {
core = { editor = "emacsclient"; }; core = { editor = "emacsclient"; };
gpg = lib.mkIf config.variables.git.gpgsm {
format = "x509";
program = "gpgsm";
};
#gpg = { #gpg = {
# format = "x509"; # format = "x509";
# program = "gpgsm"; # program = "gpgsm";
#}; #};
user = { signingKey = "C804A9C1B7AF8256"; }; user = { signingKey = config.variables.git.key; };
init = { defaultBranch = "main";}; init = { defaultBranch = "main";};
branch = { autosetuprebase = "always";}; branch = { autosetuprebase = "always";};
}; };