chore: put gnupg and pass in a module

This commit is contained in:
Yorick Barbanneau 2024-04-10 23:16:32 +02:00
parent 8b453699db
commit 836514c1d4
6 changed files with 43 additions and 30 deletions

View file

@ -1,10 +1,6 @@
{ ... }:
{
imports = [
./pass.nix
./gnupg.nix
./bat.nix
./eza.nix
./direnv.nix
];
}

View file

@ -1,20 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
pinentry-gnome
pkgs.gcr
];
programs.gpg = {
enable = true;
scdaemonSettings = {
disable-ccid = true;
};
};
services.gpg-agent = {
enable = true;
enableScDaemon = true;
enableZshIntegration = true;
pinentryFlavor = "gnome3";
};
}

View file

@ -1,6 +0,0 @@
{ pkgs, ... }:
{
programs.password-store = {
enable = true;
};
}

View file

@ -1,6 +1,7 @@
{ ... }: {
config.modules = {
application = {
gnupg.enable = true;
zathura.enable = true;
foot.enable = true;
};

View file

@ -0,0 +1,41 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.application.gnupg;
in
{
options.modules.application.gnupg = {
enable = mkEnableOption "enable GnuPG and related utils";
pass = mkOption {
type = types.bool;
default = true;
description = "install password-store";
};
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
pinentry-gnome
pkgs.gcr
];
programs.gpg = {
enable = true;
scdaemonSettings = {
disable-ccid = true;
};
};
services.gpg-agent = {
enable = true;
enableScDaemon = true;
enableZshIntegration = true;
pinentryFlavor = "gnome3";
};
programs.password-store = {
enable = cfg.pass;
};
};
}

View file

@ -2,6 +2,7 @@
{
imports = [
./application/foot
./application/gnupg
./application/imv
./application/zathura
./cli/ghq/default.nix