helm/modules/shell/pass.nix
Henrik Lissner a75c64d04a
Rewrite to use flakes
This puts a hard dependency on 20.09, but that's to be expected.
2020-10-11 01:31:33 -04:00

23 lines
504 B
Nix

{ config, options, pkgs, lib, ... }:
with lib;
with lib.my;
let cfg = config.modules.shell.pass;
in {
options.modules.shell.pass = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
user.packages = with pkgs; [
(pass.withExtensions (exts: [
exts.pass-otp
exts.pass-genphrase
] ++ (if config.modules.shell.gnupg.enable
then [ exts.pass-tomb ]
else [])))
];
env.PASSWORD_STORE_DIR = "$HOME/.secrets/password-store";
};
}