31 lines
664 B
Nix
31 lines
664 B
Nix
{ 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 = "Enables pass tool to manage 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;
|
|
};
|
|
}
|