aboutsummaryrefslogtreecommitdiff
path: root/users/fcuny/cli/git.nix
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-03-05 13:16:27 -0800
committerFranck Cuny <franck@fcuny.net>2022-03-05 13:18:46 -0800
commit3f861ebe8e156d9ba7a24ee1a256a28be4cca56f (patch)
tree68fe37d7f6e6f9f015a768eed9410c70f5d5e2e2 /users/fcuny/cli/git.nix
parentgit: nixfmt (diff)
downloadinfra-3f861ebe8e156d9ba7a24ee1a256a28be4cca56f.tar.gz
git: sign with GPG only when one desktop
Move the configuration for git that requires the signing to pass, and use the `pass-git-helper` to manage the secrets.
Diffstat (limited to 'users/fcuny/cli/git.nix')
-rw-r--r--users/fcuny/cli/git.nix14
1 files changed, 4 insertions, 10 deletions
diff --git a/users/fcuny/cli/git.nix b/users/fcuny/cli/git.nix
index 30ee841..8afb7ec 100644
--- a/users/fcuny/cli/git.nix
+++ b/users/fcuny/cli/git.nix
@@ -1,6 +1,7 @@
-{ config, ... }:
+{ lib, config, ... }:
-{
+let inherit (lib) mkIf;
+in {
programs.git = {
enable = true;
aliases = {
@@ -17,16 +18,9 @@
};
userName = "Franck Cuny";
userEmail = "franck@fcuny.net";
- signing = {
- key = config.programs.gpg.settings.default-key;
- signByDefault = true;
- };
extraConfig = {
"credential \"https://github.com\"" = { username = "fcuny"; };
- "credential \"https://git.fcuny.net\"" = {
- username = "fcuny";
- helper = "!echo -n 'password='; pass git/git.fcuny.net";
- };
+ "credential \"https://git.fcuny.net\"" = { username = "fcuny"; };
};
ignores = [
"*.elc"