From b72274ab06b4c160fc8d3afe8e2d67863c893a58 Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Sun, 3 Apr 2022 15:12:16 -0700 Subject: home-manager: add `isTrusted` Install and configure some programs only on trusted machines. On trusted machines, my mails, GPG and a few other things are configured. A machine where this is not needed on a regular basis to get things done don't need that much information. Also rename `desktop/trust` to `trusted`, in case we want these packages on a host that is not a desktop, and `trusted` is a better description. --- users/fcuny/desktop/trust/email.nix | 70 ------------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 users/fcuny/desktop/trust/email.nix (limited to 'users/fcuny/desktop/trust/email.nix') diff --git a/users/fcuny/desktop/trust/email.nix b/users/fcuny/desktop/trust/email.nix deleted file mode 100644 index 3bb6bd2..0000000 --- a/users/fcuny/desktop/trust/email.nix +++ /dev/null @@ -1,70 +0,0 @@ -{ pkgs, config, lib, ... }: - -{ - accounts.email = { - maildirBasePath = "${config.home.homeDirectory}/.mail"; - accounts = { - Fastmail = rec { - primary = true; - address = "franck@fcuny.net"; - userName = address; - realName = "Franck Cuny"; - aliases = [ "franck.cuny@gmail.com" ]; - passwordCommand = "pass email/imap.fastmail.com"; - imap.host = "imap.fastmail.com"; - mbsync = { - enable = true; - create = "maildir"; - expunge = "both"; - extraConfig.channel.CopyArrivalDate = "yes"; - }; - notmuch.enable = true; - }; - }; - }; - - programs.mbsync.enable = true; - - programs.afew = { - enable = true; - extraConfig = '' - [SpamFilter] - [KillThreadsFilter] - [ArchiveSentMailsFilter] - [InboxFilter] - ''; - }; - - programs.notmuch = { - enable = true; - maildir.synchronizeFlags = true; - new.tags = [ "unread" "inbox" ]; - new.ignore = [ "Trash" ]; - search.excludeTags = [ "spam" "deleted" ]; - hooks = { - postNew = "${config.home.profileDirectory}/bin/afew -v --tag --new"; - }; - }; - - systemd.user.services.mbsync = { - Unit = { Description = "mbsync synchronization"; }; - Service = { - Type = "oneshot"; - Environment = [ - "PASSWORD_STORE_DIR=${config.programs.password-store.settings.PASSWORD_STORE_DIR}" - "NOTMUCH_CONFIG=${config.xdg.configHome}/notmuch/notmuchrc" - ]; - ExecStart = "${pkgs.isync}/bin/mbsync -a"; - ExecStartPost = "${pkgs.notmuch}/bin/notmuch new --quiet"; - }; - }; - - systemd.user.timers.mbsync = { - Unit = { Description = "mbsync synchronization"; }; - Timer = { - OnBootSec = "30"; - OnUnitActiveSec = "5m"; - }; - Install = { WantedBy = [ "timers.target" ]; }; - }; -} -- cgit v1.2.3