Move programs to modules

This commit is contained in:
2023-01-02 22:08:18 +00:00
parent 046eb42dd3
commit e45609ea4b
23 changed files with 586 additions and 250 deletions

21
modules/security/gpg.nix Normal file
View File

@ -0,0 +1,21 @@
{ config, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.security.gpg;
in {
options.modules.security.gpg = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
home.programs.gpg = {
enable = true;
};
home.services.gpg-agent = {
enable = true;
enableSshSupport = true;
};
};
}

17
modules/security/pass.nix Normal file
View File

@ -0,0 +1,17 @@
{ config, lib, pkgs, ... }:
with lib;
with lib.my;
let cfg = config.modules.security.pass;
in {
options.modules.security.pass = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
home.programs.password-store = {
enable = true;
package = pkgs.pass.withExtensions (exts: [ exts.pass-otp ]);
};
};
}