30 lines
595 B
Nix
30 lines
595 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";
|
|
};
|
|
};
|
|
services.pass-secret-service.enable = true;
|
|
|
|
programs.gpg.enable = true;
|
|
services.gpg-agent.enable = true;
|
|
};
|
|
}
|