From d8174e8484d2b4b3f0fb721c0236eb4d27d5e9bb Mon Sep 17 00:00:00 2001 From: stitchy Date: Fri, 15 Mar 2024 22:22:20 +0000 Subject: [PATCH] Mostly fix mail syncing service (todo notifications) --- packages/default.nix | 14 ++++++++++++++ users/stitchynyan/home.nix | 21 ++++++++++----------- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/packages/default.nix b/packages/default.nix index 49b4758..70b8969 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -41,6 +41,20 @@ ifuse ]; + nixpkgs.overlays = [ + (final: prev: { + # Because Luck Smith hasn't released in 2 years + mutt-wizard = prev.mutt-wizard.overrideAttrs (old: { + src = prev.fetchFromGitHub { + owner = "LukeSmithxyz"; + repo = "mutt-wizard"; + rev = "a8863a750a360bad6759f5f2c4df5d2001b31e18"; + hash = "sha256-8zPkzQ1Tt9t8G+uCKybBm4yMqfF2y4L7nmuaWWz9t6s="; + }; + }); + }) + ]; + fonts.packages= with pkgs; [ noto-fonts noto-fonts-emoji diff --git a/users/stitchynyan/home.nix b/users/stitchynyan/home.nix index fdb8447..38a0d02 100644 --- a/users/stitchynyan/home.nix +++ b/users/stitchynyan/home.nix @@ -7,16 +7,12 @@ inputs, home-manager, ... }: - { imports = [ #inputs.nix-index-db.hmModules.nix-index ]; - # systemd.user.services.mailsync = { - - #} home.packages = with pkgs; [ steam networkmanagerapplet @@ -62,7 +58,6 @@ (octaveFull.withPackages (lib.attrVals ["symbolic"])) ]; - dconf.settings = { "org/virt-manager/virt-manager/connections" = { autoconnect = ["qemu:///system"]; @@ -111,11 +106,15 @@ }; Service = { Type = "oneshot"; - # Dumb mutt-wizard not updating in over a year - ExecStart = "/home/stitchynyan/.config/mutt/mutt-wizard/bin/mailsync"; - Environment = [ - "SASL_PATH=/run/current-system/sw/lib/sasl2" - ]; + ExecStart = "${pkgs.mutt-wizard}/bin/mailsync"; + Environment = [ + "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus" + "DISPLAY=:0" + "MBSYNCRC=/home/stitchynyan/.config/mbsync/config" + "PATH=$PATH:${lib.makeBinPath [ pkgs.busybox pkgs.cyrus-sasl-xoauth2 pkgs.gnupg pkgs.isync pkgs.notify pkgs.notmuch pkgs.pass pkgs.perl pkgs.python3 ]}" + "SASL_PATH=/run/current-system/sw/lib/sasl2" + "WAYLAND_DISPLAY=wayland-1" + ]; }; Install.WantedBy = [ "default.target" ]; }; @@ -123,7 +122,7 @@ systemd.user.timers = { mailsync = { - Unit.Description = "Syncs emai"; + Unit.Description = "Syncs email"; Timer = { OnBootSec = "1min"; OnUnitActiveSec = "10min";