about summary refs log tree commit diff
path: root/home/pass/default.nix
blob: eb43c3a107c8d1b27fe487afa060e525a67216ab (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{ config, lib, pkgs, ... }:
let cfg = config.my.home.pass;
in
{
  options.my.home.pass = with lib; {
    enable = mkEnableOption "passage configuration";
  };
  config = lib.mkIf cfg.enable {
    home.packages = with pkgs; [
      passage
      tree
    ];

    home.sessionVariables = {
      PASSAGE_DIR = "${config.xdg.dataHome}/passage/store";
      PASSAGE_IDENTITIES_FILE = "${config.xdg.dataHome}/passage/identities";
      # for now I have to default to rage, as the version of age is
      # not recent enough to work with keys generated by
      # age-plugin-yubikey
      PASSAGE_AGE = "${pkgs.rage}/bin/rage";
    };

  };
}