Switch to using pass-git-helper for https git auth

Remove gitFull and associated secret-store auth save mechanism

Also set default pinentry flavour to curses, but still set to gnome3
in hyprland setup - provides fall back for non-GUI interfaces
This commit is contained in:
Evie Litherland-Smith 2024-01-12 08:19:20 +00:00
parent 42051a089a
commit dfaa360dfe
5 changed files with 16 additions and 8 deletions

View file

@ -0,0 +1,6 @@
[DEFAULT]
username_extractor=regex_search
regex_username=^login: (.*)$
[*]
target=git/${host}

View file

@ -1,7 +1,6 @@
{ config, pkgs, ... }: { config, lib, pkgs, ... }: {
xdg.configFile."pass-git-helper/git-pass-mapping.ini".source =
{ ./git-pass-mapping.ini;
home.packages = [ pkgs.pinentry ];
programs = { programs = {
gpg.enable = true; gpg.enable = true;
password-store = { password-store = {
@ -13,6 +12,9 @@
PASSWORD_STORE_ENABLE_EXTENSIONS = "true"; PASSWORD_STORE_ENABLE_EXTENSIONS = "true";
}; };
}; };
git.extraConfig.credential = {
helper = "${pkgs.pass-git-helper}/bin/pass-git-helper";
};
}; };
services = { services = {
gpg-agent = rec { gpg-agent = rec {
@ -20,7 +22,7 @@
maxCacheTtl = 86400; maxCacheTtl = 86400;
defaultCacheTtl = maxCacheTtl; defaultCacheTtl = maxCacheTtl;
defaultCacheTtlSsh = maxCacheTtl; defaultCacheTtlSsh = maxCacheTtl;
pinentryFlavor = "gnome3"; pinentryFlavor = lib.mkDefault "curses";
extraConfig = '' extraConfig = ''
no-allow-external-cache no-allow-external-cache
''; '';

View file

@ -70,7 +70,6 @@
}; };
git = { git = {
enable = true; enable = true;
package = pkgs.gitFull;
userName = "Evie Litherland-Smith"; userName = "Evie Litherland-Smith";
userEmail = lib.mkDefault "evie@xenia.me.uk"; userEmail = lib.mkDefault "evie@xenia.me.uk";
delta = { delta = {
@ -89,7 +88,6 @@
init.defaultBranch = "main"; init.defaultBranch = "main";
merge.conflictstyle = "diff3"; merge.conflictstyle = "diff3";
diff.colorMoved = "default"; diff.colorMoved = "default";
credential.helper = "${pkgs.gitFull}/bin/git-credential-libsecret";
}; };
}; };
ssh = { ssh = {

View file

@ -1,6 +1,7 @@
{ config, lib, pkgs, ... }: { { config, lib, pkgs, ... }: {
imports = [ ./waybar/default.nix ]; imports = [ ./waybar/default.nix ];
services = { services = {
gpg-agent.pinentryFlavor = "gnome3";
avizo.enable = true; avizo.enable = true;
syncthing.enable = true; syncthing.enable = true;
udiskie = { udiskie = {

View file

@ -8,7 +8,8 @@
coreutils coreutils
libsecret libsecret
gnumake gnumake
gitFull git
pinentry
zip zip
unzip unzip
fd fd