{ lib, config, pkgs, ... }: with lib; let cfg = config.progs.pass; passDataDir = "${config.xdg.dataHome}/pass"; in { options.progs.pass = { enable = mkOption { type = types.bool; default = false; description = "Add and configure pass tool to manager your passwords"; }; }; config = mkIf cfg.enable { programs.password-store = { enable = true; settings = { PASSWORD_STORE_DIR = "${passDataDir}/store"; PASSWORD_STORE_EXTENSIONS_DIR = "${passDataDir}/extensions"; }; }; services.pass-secret-service.enable = true; programs.gpg.enable = true; services.gpg-agent.enable = true; }; }