system/home/progs/pass.nix

32 lines
675 B
Nix
Raw Normal View History

{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.progs.pass;
2022-09-01 13:29:50 +03:00
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";
};
};
2022-08-29 15:40:41 +03:00
config = mkIf cfg.enable {
2022-09-01 13:29:50 +03:00
programs.password-store = {
enable = true;
settings = {
PASSWORD_STORE_DIR = "${passDataDir}/store";
PASSWORD_STORE_EXTENSIONS_DIR = "${passDataDir}/extensions";
};
};
2022-09-01 13:29:50 +03:00
services.pass-secret-service.enable = true;
programs.gpg.enable = true;
services.gpg-agent.enable = true;
};
}