about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--default.nix5
-rw-r--r--pkgs/larbs-mail/default.nix9
-rw-r--r--pkgs/larbs-mail/mutt-wizard.nix (renamed from pkgs/mutt-wizard/default.nix)0
-rw-r--r--pkgs/larbs-mail/neomutt_wrapped.nix28
4 files changed, 38 insertions, 4 deletions
diff --git a/default.nix b/default.nix
index b15c9d6..cab7895 100644
--- a/default.nix
+++ b/default.nix
@@ -8,6 +8,9 @@
 
 { pkgs ? import <nixpkgs> {} }:
 
+let
+  wrapNeomutt = pkgs.callPackage ./pkgs/neomutt_configurable/wrapper.nix { };
+in
 {
   # The `lib`, `modules`, and `overlay` names are special
   lib = import ./lib { inherit pkgs; }; # functions
@@ -19,11 +22,11 @@
   dwm = pkgs.callPackage ./pkgs/dwm { };
   dwmblocks = pkgs.callPackage ./pkgs/dwmblocks { };
   dmenu = pkgs.callPackage ./pkgs/dmenu { };
-  mutt-wizard = pkgs.callPackage ./pkgs/mutt-wizard { };
   xwallpaper = pkgs.callPackage ./pkgs/xwallpaper { };
   libthinkpad = pkgs.callPackage ./pkgs/libthinkpad { };
   dockd = pkgs.callPackage ./pkgs/dockd { };
   larbs-mail = pkgs.callPackage ./pkgs/larbs-mail { };
+  fx = (pkgs.callPackage ./pkgs/fx { }).package;
   # xcb-util = pkgs.callPackage ./pkgs/xcb-util { }; #unknown error
   # amfora = pkgs.callPackage ./pkgs/amfora { };
   # ...
diff --git a/pkgs/larbs-mail/default.nix b/pkgs/larbs-mail/default.nix
index d5b9bb1..ef41092 100644
--- a/pkgs/larbs-mail/default.nix
+++ b/pkgs/larbs-mail/default.nix
@@ -1,10 +1,13 @@
-{ stdenv, callPackage, buildEnv, neomutt, isync, pass, msmtp, notmuch, libnotify }:
+{ stdenv, callPackage, buildEnv, isync, pass, msmtp, notmuch, libnotify }:
 with stdenv.lib;
+
 let
-  mutt-wizard = callPackage ../mutt-wizard { };
+  mutt-wizard = callPackage ./mutt-wizard.nix { };
+  neomutt = callPackage ./neomutt_wrapped.nix { };
 in
 buildEnv {
   name = "larbs-mail";
+
   paths = [
     neomutt
     isync
@@ -17,7 +20,7 @@ buildEnv {
 
   meta = {
     homepage = "https://github.com/LukeSmithXYZ/mutt-wizard";
-    description = "A system for automatically configuring mutt and isync with a simple interface and safe passwords";
+    description = "Neomutt + Mutt-Wizard: A system for automatically configuring mutt and isync with a simple interface and safe passwords";
     license = licenses.gpl3;
     platforms = platforms.linux;
   };
diff --git a/pkgs/mutt-wizard/default.nix b/pkgs/larbs-mail/mutt-wizard.nix
index aa6d533..aa6d533 100644
--- a/pkgs/mutt-wizard/default.nix
+++ b/pkgs/larbs-mail/mutt-wizard.nix
diff --git a/pkgs/larbs-mail/neomutt_wrapped.nix b/pkgs/larbs-mail/neomutt_wrapped.nix
new file mode 100644
index 0000000..bd1c011
--- /dev/null
+++ b/pkgs/larbs-mail/neomutt_wrapped.nix
@@ -0,0 +1,28 @@
+{stdenv, makeWrapper, callPackage, writeText, neomutt }:
+with stdenv.lib;
+let
+  mutt-wizard = callPackage ./mutt-wizard.nix { };
+  muttrc = writeText "muttrc" ''
+    source ${mutt-wizard}/share/mutt-wizard/mutt-wizard.muttrc
+    source $HOME/.config/mutt/muttrc
+  '';
+in
+  stdenv.mkDerivation rec {
+    name = "larbs-mail";
+    unpackPhase = "true";
+
+    buildInputs = [ makeWrapper ];
+
+
+    installPhase = ''
+      makeWrapper ${neomutt}/bin/neomutt $out/bin/neomutt \
+        --add-flags "-F ${muttrc}"
+    '';
+
+    meta = {
+      homepage = "https://github.com/LukeSmithXYZ/mutt-wizard";
+      description = "A system for automatically configuring mutt and isync with a simple interface and safe passwords";
+      license = licenses.gpl3;
+      platforms = platforms.linux;
+    };
+  }