pinentry fix on wsl

This commit is contained in:
Sridhar Ratnakumar 2021-09-30 10:44:12 -04:00
parent f924244af1
commit 1b69389ce8
2 changed files with 17 additions and 2 deletions

View file

@ -4,10 +4,13 @@
agent = {
enable = true;
enableExtraSocket = true;
# pinentryFlavor = "curses";
pinentryFlavor = "curses";
};
};
environment.systemPackages = with pkgs; [
pass
# Pinentry doesn't work on WSL NixOS unless manually configured on gpg-agent.conf
# See https://sigkill.dk/writings/guides/nixos_pass.html
pinentry-curses
];
}

View file

@ -35,7 +35,19 @@ in
extraOptions = ''
experimental-features = nix-command flakes
'';
};
};
# https://github.com/NixOS/nixpkgs/issues/124753#issuecomment-851618324
nixpkgs.overlays =
let pinentry_only_curses = self: super: {
pinentry = super.pinentry.override {
enabledFlavors = [ "curses" ];
};
};
in
[
pinentry_only_curses
];
security.sudo.wheelNeedsPassword = false;