From 61f3db56410f41d5249c88e44db60d9713dae26d Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Tue, 3 Dec 2024 21:19:39 -0600 Subject: home: big refactor --- home/mail/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'home/mail') diff --git a/home/mail/default.nix b/home/mail/default.nix index 06d1225..f070b2f 100644 --- a/home/mail/default.nix +++ b/home/mail/default.nix @@ -1,6 +1,11 @@ { config, lib, pkgs, ... }: -with lib; { +with lib; let + cfg = config.local.mail; +in +{ options.local.mail = with types; { + enable = mkEnableOption "mail"; + address = mkOption { type = str; }; @@ -12,7 +17,7 @@ with lib; { sieve.enable = mkEnableOption "sieve filter"; }; - config = mkIf (!config.home.isolation.active) { + config = mkIf cfg.enable { accounts.email = { maildirBasePath = "mail"; -- cgit v1.2.3