nixos/home/accounts/pass.nix

39 lines
1.1 KiB
Nix
Raw Normal View History

{ config, lib, pkgs, ... }: {
xdg.configFile."pass-git-helper/git-pass-mapping.ini".source =
./git-pass-mapping.ini;
programs = {
gpg.enable = true;
password-store = {
enable = true;
package = pkgs.pass-nodmenu.withExtensions
(exts: with exts; [ pass-otp pass-update pass-audit pass-import ]);
2023-10-10 07:18:59 +01:00
settings = {
PASSWORD_STORE_DIR = "${config.home.homeDirectory}/.password-store";
PASSWORD_STORE_ENABLE_EXTENSIONS = "true";
};
};
git.extraConfig.credential = {
helper = "${pkgs.pass-git-helper}/bin/pass-git-helper";
};
};
services = {
2023-09-30 08:10:21 +01:00
gpg-agent = rec {
enable = true;
2023-09-30 08:10:21 +01:00
maxCacheTtl = 86400;
defaultCacheTtl = maxCacheTtl;
defaultCacheTtlSsh = maxCacheTtl;
pinentryFlavor = lib.mkDefault "curses";
extraConfig = ''
no-allow-external-cache
'';
};
git-sync = {
enable = true;
repositories.password-store = {
path = "${config.home.homeDirectory}/.password-store";
uri = "git+https://git.xenia.me.uk/xenia/pass.git";
};
2023-10-16 13:19:38 +01:00
};
};
}