nix: guard password-store configuration behinf mkIf

This commit is contained in:
Primrose 2024-07-04 07:45:20 +02:00
parent 70a4f67865
commit a18a3d58ef
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
2 changed files with 13 additions and 3 deletions

View file

@ -1,7 +1,12 @@
{ config, pkgs, ... }:
{
programs.password-store = {
enable = true;
config,
pkgs,
lib,
...
}:
let
cfg = {
package = pkgs.pass.withExtensions (exts: [
exts.pass-otp
exts.pass-import
@ -10,4 +15,8 @@
PASSWORD_STORE_DIR = "${config.home.homeDirectory}/repos/leana/vault";
};
};
in
{
programs.password-store = lib.mkIf config.programs.password-store.enable cfg;
}