summaryrefslogtreecommitdiff
path: root/user-profiles/feeds/module.nix
diff options
context:
space:
mode:
Diffstat (limited to 'user-profiles/feeds/module.nix')
-rw-r--r--user-profiles/feeds/module.nix32
1 files changed, 30 insertions, 2 deletions
diff --git a/user-profiles/feeds/module.nix b/user-profiles/feeds/module.nix
index da992b8c..de1a65c6 100644
--- a/user-profiles/feeds/module.nix
+++ b/user-profiles/feeds/module.nix
@@ -55,7 +55,7 @@ let
55 }; 55 };
56 in haskellPackages.imm; 56 in haskellPackages.imm;
57 immWrapped = pkgs.runCommand "${imm.name}-wrapped-${config.home.username}" 57 immWrapped = pkgs.runCommand "${imm.name}-wrapped-${config.home.username}"
58 { nativeBuildInputs = with pkgs; [ makeWrapper imm ]; 58 { nativeBuildInputs = with pkgs; [ makeWrapper ];
59 } '' 59 } ''
60 mkdir -p $out/bin 60 mkdir -p $out/bin
61 makeWrapper ${imm}/bin/imm $out/bin/imm \ 61 makeWrapper ${imm}/bin/imm $out/bin/imm \
@@ -154,9 +154,37 @@ let
154 path = afewHook; 154 path = afewHook;
155 } 155 }
156 ]; 156 ];
157
158 notmuchWrapped = pkgs.runCommand "${pkgs.notmuch.name}-wrapped-${config.home.username}"
159 { nativeBuildInputs = with pkgs; [ makeWrapper ];
160 } ''
161 mkdir -p $out/bin
162 makeWrapper ${pkgs.notmuch}/bin/notmuch $out/bin/notmuch-feeds \
163 --set NOTMUCH_CONFIG ${configPath}
164 '';
165 alotWrapped = pkgs.runCommand "${pkgs.alot.name}-wrapped-${config.home.username}"
166 { nativeBuildInputs = with pkgs; [ makeWrapper gnused ];
167 } ''
168 mkdir -p $out/bin
169 makeWrapper ${pkgs.alot}/bin/alot $out/bin/alot-feeds \
170 --add-flags --config=${alotConfig} \
171 --add-flags --notmuch-config=${configPath}
172
173 mkdir $out/share
174 ln -s ${pkgs.alot}/share/alot $out/share
175 mkdir -p $out/share/applications
176 sed -r 's/alot/alot-feeds/g' ${pkgs.alot}/share/applications/alot.desktop > $out/share/applications/alot-feeds.desktop
177 mkdir -p $out/share/zsh/site-functions
178 sed -r 's/alot/alot-feeds/g' ${pkgs.alot}/share/zsh/site-functions/_alot > $out/share/zsh/site-functions/_alot-feeds
179 '';
180
181 alotConfig = pkgs.runCommand "alot" {
182 realname = notmuchIni.user.name;
183 address = notmuchIni.user.primary_email;
184 } "substituteAll ${./alot.config} $out";
157in { 185in {
158 config = { 186 config = {
159 home.packages = [ immWrapped ]; 187 home.packages = [ immWrapped notmuchWrapped pkgs.notmuch.man alotWrapped ];
160 188
161 home.activation.createImm = hm.dag.entryAfter ["writeBoundary"] '' 189 home.activation.createImm = hm.dag.entryAfter ["writeBoundary"] ''
162 $DRY_RUN_CMD mkdir -p $VERBOSE_ARG ${config.xdg.configHome}/imm 190 $DRY_RUN_CMD mkdir -p $VERBOSE_ARG ${config.xdg.configHome}/imm