This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

tools.mutt: try to fix c-base sending mails

+17 -33
-20
2configs/games.nix
··· 1 - { config, pkgs, ... }: 2 - 3 - let 4 - mainUser = config.users.extraUsers.mainUser; 5 - 6 - in 7 1 { 8 2 users.extraUsers = { 9 3 games = { ··· 19 13 ]; 20 14 createHome = true; 21 15 useDefaultShell = true; 22 - packages = with pkgs; [ 23 - # minecraft 24 - # ftb 25 - # steam-run 26 - # scummvm 27 - # dolphinEmu 28 - # doom1 29 - # doom2 30 - # protontricks 31 - # vdoom1 32 - # vdoom2 33 - # vdoomserver 34 - retroarchBare 35 - ]; 36 16 isNormalUser = true; 37 17 }; 38 18 };
+17 -13
tools/mutt/flake-module.nix
··· 36 36 ''; 37 37 38 38 msmtp = pkgs.writeShellScriptBin "msmtp" '' 39 - # Check if prism.r is reachable, fallback to Tor if not 40 - if ping -W2 -c1 prism.r >/dev/null 2>&1; then 39 + # Check if using c-base account (either explicit -a c-base or via From: header) 40 + using_cbase=0 41 + for arg in "$@"; do 42 + if [[ "$arg" == "c-base" ]] || [[ "$arg" =~ @c-base\.org ]]; then 43 + using_cbase=1 44 + break 45 + fi 46 + done 47 + 48 + # For c-base account, always send directly (no Tor needed) 49 + if [ "$using_cbase" -eq 1 ]; then 50 + ${pkgs.coreutils}/bin/tee >(${pkgs.notmuch}/bin/notmuch insert +sent) | \ 51 + ${pkgs.msmtp}/bin/msmtp -C ${msmtprc} "$@" 52 + # For prism account, check if prism.r is reachable 53 + elif ping -W2 -c1 prism.r >/dev/null 2>&1; then 41 54 ${pkgs.coreutils}/bin/tee >(${pkgs.notmuch}/bin/notmuch insert +sent) | \ 42 55 ${pkgs.msmtp}/bin/msmtp -C ${msmtprc} "$@" 43 56 else 44 - # Build dependencies lazily for Tor fallback 45 - echo "Building tornade and clan-cli for Tor fallback..." >&2 46 - tornade_path=$(nix build --no-link --print-out-paths "${self}#tornade") 47 - clan_path=$(nix build --no-link --print-out-paths "${self}#clan-cli") 48 - 49 - # Get tor hostname using clan CLI 50 - tor_hostname=$(CLAN_DIR="${self}" "$clan_path/bin/clan" vars get prism tor-ssh/tor-hostname) 51 - 52 - # Use tornade to send via Tor 53 - ${pkgs.coreutils}/bin/tee >(${pkgs.notmuch}/bin/notmuch insert +sent) | \ 54 - "$tornade_path/bin/tornade" ssh -T lass@"$tor_hostname" "cat | msmtp -C /etc/msmtprc $*" 57 + echo "Error: prism.r is not reachable" >&2 58 + exit 1 55 59 fi 56 60 ''; 57 61