From da56b4ea644090f3fcfb3557e022d0673687889e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Schwarz=C3=A4ugl?= Date: Tue, 21 Oct 2025 21:56:00 +0200 Subject: [PATCH] fix[work]: reply using S/MIME when appropriate --- SwarselSystems.org | 6 +- files/emacs/init.el | 6 +- index.html | 170 +++++++++++++++++++++++--------------------- 3 files changed, 97 insertions(+), 85 deletions(-) diff --git a/SwarselSystems.org b/SwarselSystems.org index cda52c9..a965aca 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -19054,6 +19054,10 @@ Used here: [[#h:b92a18cf-eec3-4605-a8c2-37133ade3574][mu4e]] (when-let ((dest (swarsel/mu4e-rfs--matching-address))) (cl-destructuring-bind (from-user from-addr) dest (setq user-mail-address from-addr) + (when (and (boundp 'user-mail-address) + (stringp user-mail-address) + (string-equal user-mail-address (getenv "SWARSEL_MAIL_WORK"))) + (mml-secure-message-sign-smime)) (message-position-on-field "From") (message-beginning-of-line) (delete-region (point) (line-end-position)) @@ -21832,7 +21836,7 @@ The hook functions are defined here: [[#h:34506761-06b9-43b5-a818-506d9b3faf28][ (setq mu4e-mu-binary (executable-find "mu")) (setq mu4e-hide-index-messages t) - (setq mu4e-update-interval 180) + (setq mu4e-update-interval 60) (setq mu4e-get-mail-command "mbsync -a") (setq mu4e-maildir "~/Mail") diff --git a/files/emacs/init.el b/files/emacs/init.el index e8d147e..ef36c52 100644 --- a/files/emacs/init.el +++ b/files/emacs/init.el @@ -30,6 +30,10 @@ (when-let ((dest (swarsel/mu4e-rfs--matching-address))) (cl-destructuring-bind (from-user from-addr) dest (setq user-mail-address from-addr) + (when (and (boundp 'user-mail-address) + (stringp user-mail-address) + (string-equal user-mail-address (getenv "SWARSEL_MAIL_WORK"))) + (mml-secure-message-sign-smime)) (message-position-on-field "From") (message-beginning-of-line) (delete-region (point) (line-end-position)) @@ -1560,7 +1564,7 @@ create a new one." (setq mu4e-mu-binary (executable-find "mu")) (setq mu4e-hide-index-messages t) - (setq mu4e-update-interval 180) + (setq mu4e-update-interval 60) (setq mu4e-get-mail-command "mbsync -a") (setq mu4e-maildir "~/Mail") diff --git a/index.html b/index.html index 07f172c..b6bd78d 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + SwarselSystems: NixOS + Emacs Configurationo @@ -209,7 +209,7 @@
  • 1.4. Hosts
  • 1.5. Programs
  • 1.6. Services
  • -
  • 1.7. Manual steps when setting up a new machine
  • +
  • 1.7. Manual steps when setting up a new machine
  • 2. flake.nix @@ -444,8 +444,8 @@
  • 3.2.5.8. Hibernation
  • 3.2.5.9. BTRFS
  • 3.2.5.10. work
  • -
  • 3.2.5.11. microvm-host
  • -
  • 3.2.5.12. microvm-guest
  • +
  • 3.2.5.11. microvm-host
  • +
  • 3.2.5.12. microvm-guest
  • @@ -473,7 +473,7 @@
  • 3.3.1.12. Sourcing environment variables
  • 3.3.1.13. General Programs: bottom, imv, less, lesspipe, sioyek, bat, carapace, wlogout, swayr, yt-dlp, mpv, jq, nix-index, ripgrep, pandoc, fzf, zoxide, timidity
  • 3.3.1.14. nix-index
  • -
  • 3.3.1.15. nix-your-shell
  • +
  • 3.3.1.15. nix-your-shell
  • 3.3.1.16. password-store
  • 3.3.1.17. direnv
  • 3.3.1.18. eza
  • @@ -496,12 +496,12 @@
  • 3.3.1.31.3. Mako
  • 3.3.1.31.4. SwayOSD
  • 3.3.1.31.5. yubikey-touch-detector
  • -
  • 3.3.1.31.6. blueman-applet
  • -
  • 3.3.1.31.7. network-manager-applet
  • -
  • 3.3.1.31.8. obsidian service for tray
  • -
  • 3.3.1.31.9. anki service for tray
  • -
  • 3.3.1.31.10. element service for tray
  • -
  • 3.3.1.31.11. vesktop service for tray
  • +
  • 3.3.1.31.6. blueman-applet
  • +
  • 3.3.1.31.7. network-manager-applet
  • +
  • 3.3.1.31.8. obsidian service for tray
  • +
  • 3.3.1.31.9. anki service for tray
  • +
  • 3.3.1.31.10. element service for tray
  • +
  • 3.3.1.31.11. vesktop service for tray
  • 3.3.1.32. Sway
  • @@ -510,17 +510,17 @@
  • 3.3.1.35. gpg-agent
  • 3.3.1.36. gammastep
  • 3.3.1.37. Spicetify
  • -
  • 3.3.1.38. Obsidian
  • -
  • 3.3.1.39. Anki
  • -
  • 3.3.1.40. Element-desktop
  • -
  • 3.3.1.41. Hexchat
  • -
  • 3.3.1.42. obs-studio
  • -
  • 3.3.1.43. spotify-player
  • -
  • 3.3.1.44. vesktop
  • -
  • 3.3.1.45. batsignal
  • -
  • 3.3.1.46. autotiling
  • -
  • 3.3.1.47. swayidle
  • -
  • 3.3.1.48. swaylock
  • +
  • 3.3.1.38. Obsidian
  • +
  • 3.3.1.39. Anki
  • +
  • 3.3.1.40. Element-desktop
  • +
  • 3.3.1.41. Hexchat
  • +
  • 3.3.1.42. obs-studio
  • +
  • 3.3.1.43. spotify-player
  • +
  • 3.3.1.44. vesktop
  • +
  • 3.3.1.45. batsignal
  • +
  • 3.3.1.46. autotiling
  • +
  • 3.3.1.47. swayidle
  • +
  • 3.3.1.48. swaylock
  • 3.3.2. Server @@ -585,8 +585,8 @@
  • 3.5.31. swarsel-build
  • 3.5.32. swarsel-instantiate
  • 3.5.33. sshrm
  • -
  • 3.5.34. endme
  • -
  • 3.5.35. git-replace
  • +
  • 3.5.34. endme
  • +
  • 3.5.35. git-replace
  • 3.6. Profiles @@ -595,7 +595,7 @@ @@ -1215,8 +1215,8 @@ Here I give a brief overview over the hostmachines that I am using. This is held -
    -

    1.7. Manual steps when setting up a new machine

    +
    +

    1.7. Manual steps when setting up a new machine

    @@ -12178,8 +12178,8 @@ in
     
    -
    -
    3.2.5.11. microvm-host
    +
    +
    3.2.5.11. microvm-host

    Some standard options that should be set for every microvm host. @@ -12205,8 +12205,8 @@ Some standard options that should be set for every microvm host.

    -
    -
    3.2.5.12. microvm-guest
    +
    +
    3.2.5.12. microvm-guest

    Some standard options that should be set vor every microvm guest. We set the default @@ -13276,8 +13276,8 @@ nix-index provides a way to find out which packages are provided by which deriva

    -
    -
    3.3.1.15. nix-your-shell
    +
    +
    3.3.1.15. nix-your-shell
    { lib, config, ... }:
    @@ -14990,8 +14990,8 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
     
    -
    -
    3.3.1.31.6. blueman-applet
    +
    +
    3.3.1.31.6. blueman-applet
    { lib, config, ... }:
    @@ -15005,8 +15005,8 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
     
    -
    -
    3.3.1.31.7. network-manager-applet
    +
    +
    3.3.1.31.7. network-manager-applet
    { lib, config, ... }:
    @@ -15021,8 +15021,8 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
     
    -
    -
    3.3.1.31.8. obsidian service for tray
    +
    +
    3.3.1.31.8. obsidian service for tray
    { lib, config, ... }:
    @@ -15056,8 +15056,8 @@ The `extraConfig` section here CANNOT be reindented. This has something to do wi
     
    -
    -
    3.3.1.31.9. anki service for tray
    +
    +
    3.3.1.31.9. anki service for tray

    Sets up a systemd user service for anki that does not stall the shutdown process. Note that the outcommented ExecStart does not work because the home-manager anki package builds a separate anki package that - I think - cannot be referenced as no such expression exists in the module. @@ -15104,8 +15104,8 @@ Sets up a systemd user service for anki that does not stall the shutdown process

    -
    -
    3.3.1.31.10. element service for tray
    +
    +
    3.3.1.31.10. element service for tray
    { lib, config, pkgs, ... }:
    @@ -15139,8 +15139,8 @@ Sets up a systemd user service for anki that does not stall the shutdown process
     
    -
    -
    3.3.1.31.11. vesktop service for tray
    +
    +
    3.3.1.31.11. vesktop service for tray
    { lib, config, pkgs, ... }:
    @@ -16068,8 +16068,8 @@ in
     
    -
    -
    3.3.1.38. Obsidian
    +
    +
    3.3.1.38. Obsidian
    { lib, config, pkgs, nixosConfig ? config, ... }:
    @@ -16226,8 +16226,8 @@ in
     
    -
    -
    3.3.1.39. Anki
    +
    +
    3.3.1.39. Anki
    { lib, config, pkgs, globals, nixosConfig ? config, ... }:
    @@ -16299,8 +16299,8 @@ in
     
    -
    -
    3.3.1.40. Element-desktop
    +
    +
    3.3.1.40. Element-desktop
    { lib, config, ... }:
    @@ -16336,8 +16336,8 @@ in
     
    -
    -
    3.3.1.41. Hexchat
    +
    +
    3.3.1.41. Hexchat
    { lib, config, nixosConfig ? config, ... }:
    @@ -16361,8 +16361,8 @@ in
     
    -
    -
    3.3.1.42. obs-studio
    +
    +
    3.3.1.42. obs-studio
    { lib, config, ... }:
    @@ -16382,8 +16382,8 @@ in
     
    -
    -
    3.3.1.43. spotify-player
    +
    +
    3.3.1.43. spotify-player
    { lib, config, ... }:
    @@ -16403,8 +16403,8 @@ in
     
    -
    -
    3.3.1.44. vesktop
    +
    +
    3.3.1.44. vesktop
    { lib, config, ... }:
    @@ -16490,8 +16490,8 @@ in
     
    -
    -
    3.3.1.45. batsignal
    +
    +
    3.3.1.45. batsignal
    { lib, config, ... }:
    @@ -16523,8 +16523,8 @@ in
     
    -
    -
    3.3.1.46. autotiling
    +
    +
    3.3.1.46. autotiling
    { lib, config, ... }:
    @@ -16545,8 +16545,8 @@ in
     
    -
    -
    3.3.1.47. swayidle
    +
    +
    3.3.1.47. swayidle
    { lib, config, pkgs, ... }:
    @@ -16587,8 +16587,8 @@ in
     
    -
    -
    3.3.1.48. swaylock
    +
    +
    3.3.1.48. swaylock
    { lib, config, pkgs, ... }:
    @@ -19808,8 +19808,8 @@ writeShellApplication {
     
    -
    -

    3.5.34. endme

    +
    +

    3.5.34. endme

    Sometimes my DE crashes after putting it to suspend - to be precise, it happens when I put it into suspend when I have multiple screens plugged in. I have never taken the time to debug the issue, but instead just switch to a different TTY and then use this script to kill the hanging session. @@ -19830,8 +19830,8 @@ writeShellApplication {

    -
    -

    3.5.35. git-replace

    +
    +

    3.5.35. git-replace

    This script allows for quick git replace of a string. @@ -19993,8 +19993,8 @@ in

    -
    -
    3.6.1.3. Optionals
    +
    +
    3.6.1.3. Optionals
    { lib, config, ... }:
    @@ -20737,6 +20737,10 @@ Used here: mu4e
           (when-let ((dest (swarsel/mu4e-rfs--matching-address)))
             (cl-destructuring-bind (from-user from-addr) dest
               (setq user-mail-address from-addr)
    +          (when (and (boundp 'user-mail-address)
    +                     (stringp user-mail-address)
    +                     (string-equal user-mail-address (getenv "SWARSEL_MAIL_WORK")))
    +            (mml-secure-message-sign-smime))
               (message-position-on-field "From")
               (message-beginning-of-line)
               (delete-region (point) (line-end-position))
    @@ -23846,7 +23850,7 @@ The hook functions are defined here: 
     
    -
    -
    4.4.39.3. Work: Signing Mails (S/MIME, smime)
    +
    +
    4.4.39.3. Work: Signing Mails (S/MIME, smime)
    -
    -

    5.1. General steps when setting up a new machine

    +
    +

    5.1. General steps when setting up a new machine

    These general steps are needed when setting up a new machine and do not fit into another block well: @@ -27136,7 +27140,7 @@ similarly, there exists an version that starts from the right.

    Author: Leon Schwarzäugl

    -

    Created: 2025-10-21 Di 21:37

    +

    Created: 2025-10-21 Di 21:55

    Validate