diff options
author | Franck Cuny <franck@fcuny.net> | 2023-05-07 09:15:36 -0700 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2023-05-07 09:15:36 -0700 |
commit | 47043d7d7d599989beb777592e552641ee493a60 (patch) | |
tree | dfe20624e1efcba50e5cb85f9dfb74ac57816c16 /home | |
parent | profiles/workstation: move element (matrix client) (diff) | |
download | world-47043d7d7d599989beb777592e552641ee493a60.tar.gz |
home: get rid of mail / gpg modules
I don't use GPG anymore and I don't read mail in Emacs anymore.
Diffstat (limited to 'home')
-rw-r--r-- | home/default.nix | 8 | ||||
-rw-r--r-- | home/gpg/default.nix | 44 | ||||
-rw-r--r-- | home/mail/accounts/default.nix | 93 | ||||
-rw-r--r-- | home/mail/default.nix | 12 | ||||
-rw-r--r-- | home/secrets/fastmail/imap.age | 5 |
5 files changed, 0 insertions, 162 deletions
diff --git a/home/default.nix b/home/default.nix deleted file mode 100644 index 779af4e..0000000 --- a/home/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ ... }: - -{ - imports = [ - ./gpg - ./mail - ]; -} diff --git a/home/gpg/default.nix b/home/gpg/default.nix deleted file mode 100644 index b56377d..0000000 --- a/home/gpg/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ pkgs, config, lib, ... }: -let cfg = config.my.home.gpg; -in -{ - options.my.home.gpg = with lib; { - enable = mkEnableOption "gpg configuration"; - pinentry = mkOption { - type = types.str; - default = "tty"; - example = "gnome3"; - description = "Which pinentry interface to use"; - }; - defaultKey = mkOption { - type = types.str; - default = null; - description = "Default GPG key"; - }; - }; - - config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ yubikey-manager ]; - - programs.gpg = { - enable = true; - homedir = "${config.xdg.configHome}/gnupg"; - settings = { - default-key = cfg.defaultKey; - personal-cipher-preferences = "AES256 AES192 AES"; - personal-digest-preferences = "SHA512 SHA384 SHA256"; - personal-compress-preferences = "ZLIB BZIP2 ZIP Uncompressed"; - keyid-format = "long"; - with-fingerprint = true; - }; - }; - services.gpg-agent = { - enable = false; - enableSshSupport = false; # ensure we're not defaulting to GPG - pinentryFlavor = cfg.pinentry; - extraConfig = '' - allow-loopback-pinentry - ''; - }; - }; -} diff --git a/home/mail/accounts/default.nix b/home/mail/accounts/default.nix deleted file mode 100644 index de735b5..0000000 --- a/home/mail/accounts/default.nix +++ /dev/null @@ -1,93 +0,0 @@ -{ config, lib, pkgs, self, ... }: -let cfg = config.my.home.mail; -in -{ - config = lib.mkIf cfg.enable { - # to replace the secret go to - # https://app.fastmail.com/settings/security/devicekeys - homeage.file."fastmail-imap" = { - source = "${self}/home/secrets/fastmail/imap.age"; - }; - - accounts.email = { - accounts = { - Fastmail = rec { - primary = true; - address = "franck@fcuny.net"; - userName = address; - realName = "Franck Cuny"; - aliases = [ "franck.cuny@gmail.com" ]; - passwordCommand = "${pkgs.coreutils}/bin/cat '${config.homeage.mount}/fastmail-imap'"; - imap.host = "imap.fastmail.com"; - smtp.host = "smtp.fastmail.com"; - mbsync = { - enable = true; - create = "maildir"; - expunge = "both"; - extraConfig.channel.CopyArrivalDate = "yes"; - }; - msmtp.enable = true; - notmuch.enable = true; - }; - }; - }; - - programs.mbsync.enable = true; - programs.msmtp.enable = true; - - programs.afew = { - enable = true; - extraConfig = '' - [SpamFilter] - [KillThreadsFilter] - [ArchiveSentMailsFilter] - - [FolderNameFilter] - maildir_separator = / - folder_transforms = Archive:archive Drafts:draft Sent:sent - folder_lowercases = true - - [MailMover] - folders = Fastmail/Inbox - rename = True - max_age = 30 - - # rules - Fastmail/Inbox = 'tag:archive':Fastmail/Archive - ''; - }; - - programs.notmuch = { - enable = true; - maildir.synchronizeFlags = true; - new.tags = [ "unread" "new" ]; - new.ignore = [ "Trash" ]; - search.excludeTags = [ "spam" "deleted" ]; - hooks = { - postNew = "${config.home.profileDirectory}/bin/afew -v --tag --new --notmuch-config=${config.xdg.configHome}/notmuch/default/config"; - }; - }; - - systemd.user.services.mbsync = { - Unit = { Description = "mbsync synchronization"; }; - Service = { - Type = "oneshot"; - ExecStartPre = [ - "${pkgs.notmuch}/bin/notmuch tag '-inbox' 'tag:inbox AND tag:archive'" - "${pkgs.afew}/bin/afew -m -v --notmuch-config=${config.xdg.configHome}/notmuch/default/config" - ]; - 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" ]; }; - }; - }; -} diff --git a/home/mail/default.nix b/home/mail/default.nix deleted file mode 100644 index 88cae37..0000000 --- a/home/mail/default.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ config, lib, ... }: -let - cfg = config.my.home.mail; - mkRelatedOption = desc: lib.mkEnableOption desc // { default = cfg.enable; }; -in -{ - imports = [ ./accounts ]; - options.my.home.mail = with lib; { - enable = mkEnableOption "email configuration"; - }; - config = { accounts.email = { maildirBasePath = ".mail"; }; }; -} diff --git a/home/secrets/fastmail/imap.age b/home/secrets/fastmail/imap.age deleted file mode 100644 index 07dfdd1..0000000 --- a/home/secrets/fastmail/imap.age +++ /dev/null @@ -1,5 +0,0 @@ -age-encryption.org/v1 --> X25519 f/Opj/dLP20YsybwZwwfCBRcb4wWVSMv4P9tuVQUNDA -9xBaFHWpO15X2nt1urk5f59K5x7oRHxIi5q7B8UvM+Q ---- huYSJRJfQnxoHH5APR9tm+NS/xtyw56bRImLdcwiY3Q -xk>w:lR+i[oVZL? \ No newline at end of file |