flake

Francesco Saccone's Nix flake.
git clone https://git.francescosaccone.com/flake
Log | Files | Refs | README | LICENSE

default.nix (1164B)


      1 {
      2   lib,
      3   options,
      4   config,
      5   pkgs,
      6   ...
      7 }:
      8 {
      9   options.fs.programs.pass = {
     10     enable = lib.mkOption {
     11       description = "Whether to enable Password Store.";
     12       default = false;
     13       type = lib.types.bool;
     14     };
     15     directory = lib.mkOption {
     16       description = "The directory containing the encrypted passwords.";
     17       default = "${config.home.homeDirectory}/.password-store";
     18       readOnly = true;
     19       type = lib.types.uniq lib.types.path;
     20     };
     21     passwordStoreDirectory = lib.mkOption {
     22       description = ''
     23         The directory the password store directory will symlink to.
     24       '';
     25       type = lib.types.uniq lib.types.path;
     26     };
     27   };
     28 
     29   config = lib.mkIf config.fs.programs.pass.enable {
     30     programs.password-store = {
     31       enable = true;
     32       package = pkgs.pass.withExtensions (exts: [ exts.pass-otp ]);
     33       settings = {
     34         PASSWORD_STORE_DIR = config.fs.programs.pass.directory;
     35         PASSWORD_STORE_CLIP_TIME = "15";
     36       };
     37     };
     38 
     39     home.file = {
     40       ".password-store" = {
     41         source = config.fs.programs.pass.passwordStoreDirectory;
     42       };
     43     };
     44 
     45     home.packages = [ pkgs.wl-clipboard-rs ];
     46   };
     47 }