diff --git a/home/default.nix b/home/default.nix index 6f91f179..ff08ae05 100644 --- a/home/default.nix +++ b/home/default.nix @@ -2,11 +2,12 @@ { imports = [ - ./pass/default.nix + ./pass/agent.nix ./git/default.nix ./ssh/default.nix ./tui/default.nix ./tmux/default.nix + ./mail/service.nix ./hyprland/default.nix ./alacritty/default.nix ./firefox/default.nix diff --git a/home/mail/default.nix b/home/mail/default.nix index 597d2f01..cf5531a9 100644 --- a/home/mail/default.nix +++ b/home/mail/default.nix @@ -153,5 +153,4 @@ ''; }; }; - services.mbsync.enable = true; } diff --git a/home/mail/service.nix b/home/mail/service.nix new file mode 100644 index 00000000..cfe933ad --- /dev/null +++ b/home/mail/service.nix @@ -0,0 +1,6 @@ +{ ... }: + +{ + imports = [ ./default.nix ]; + services.mbsync.enable = true; +} diff --git a/home/pass/agent.nix b/home/pass/agent.nix new file mode 100644 index 00000000..8f82c17d --- /dev/null +++ b/home/pass/agent.nix @@ -0,0 +1,16 @@ +{ ... }: + +{ + imports = [ ./default.nix ]; + services.gpg-agent = { + enable = true; + defaultCacheTtl = 7200; + defaultCacheTtlSsh = 7200; + pinentryFlavor = "gtk2"; + extraConfig = '' + no-allow-external-cache + allow-emacs-pinentry + allow-loopback-pinentry + ''; + }; +} diff --git a/home/pass/default.nix b/home/pass/default.nix index 3af78b8f..2e0d955f 100644 --- a/home/pass/default.nix +++ b/home/pass/default.nix @@ -11,15 +11,4 @@ git.extraConfig.credential.helper = "${pkgs.gitFull}/bin/git-credential-libsecret"; }; - services.gpg-agent = { - enable = true; - defaultCacheTtl = 7200; - defaultCacheTtlSsh = 7200; - pinentryFlavor = "gtk2"; - extraConfig = '' - no-allow-external-cache - allow-emacs-pinentry - allow-loopback-pinentry - ''; - }; } diff --git a/hosts/Monarch/home.nix b/hosts/Monarch/home.nix index 51fa3216..ca2e5d7d 100644 --- a/hosts/Monarch/home.nix +++ b/hosts/Monarch/home.nix @@ -1,14 +1,16 @@ -{ pkgs, user, shell ? "zsh", ... }: +{ lib, pkgs, user, shell ? "zsh", ... }: let homeDirectory = "/Users/${user}"; in { imports = [ ../../home/shell/${shell}.nix - ../../home/git - ../../home/ssh - ../../home/tui - ../../home/tmux - ../../home/alacritty - ../../home/emacs + ../../home/pass/default.nix + ../../home/git/default.nix + ../../home/ssh/default.nix + ../../home/tui/default.nix + ../../home/tmux/default.nix + ../../home/mail/default.nix + ../../home/alacritty/default.nix + ../../home/emacs/default.nix ]; home = { inherit homeDirectory; @@ -25,12 +27,6 @@ in { ''; }; emacs.package = pkgs.emacs29; - gpg.enable = true; - password-store = { - enable = true; - package = pkgs.pass.withExtensions (exts: [ exts.pass-otp ]); - settings.PASSWORD_STORE_DIR = "$HOME/.password-store"; - }; }; services.syncthing.enable = true; }