aboutsummaryrefslogtreecommitdiffstats
path: root/modules/communication
diff options
context:
space:
mode:
authorArpit Chakladar <arpitchakladar+git@gmail.com>2026-07-18 12:15:20 +0530
committerArpit Chakladar <arpitchakladar+git@gmail.com>2026-07-18 12:15:20 +0530
commit4124a5ae231a585b945c9547a3ab0c37a4eba7e3 (patch)
treeb51774266eab457a13ee176bd6cd76b093b16d03 /modules/communication
parent302f83b23b364b08dc47725266db5e20437d71e4 (diff)
downloadhome-manager-config-4124a5ae231a585b945c9547a3ab0c37a4eba7e3.tar.gz
home-manager-config-4124a5ae231a585b945c9547a3ab0c37a4eba7e3.zip
refactor: replace zsh deps with runtimeShell, migrate scripts from symlinkJoin to runCommand, add missing assertions and deps
Scripts: Migrated from symlinkJoin to runCommand; replaced zsh dependency with pkgs.runtimeShell across polybar, scripts, and fzf-launcher Assertions: Added gopass/gpg checks for neomutt, signing checks for git, git dependency for lazygit, file-preview deps for lf, desktop/kitten checks for scripts Lazygit: Fixed mkIf placement, imported assertions Neomutt: Removed verbose keybinding descriptions Nixvim: Removed <c-c> notification-clear mapping File preview: Replaced libreoffice document preview with pandoc/antiword (terminal-based) Fzf launcher: Fixed bash compatibility (setopt → shopt -s) Deps: Added coreutils, fontconfig, antiword, pandoc, util-linux, bash, findutils, grep, sed, gawk, ncurses to various scripts
Diffstat (limited to 'modules/communication')
-rw-r--r--modules/communication/neomutt/account/default.nix31
-rw-r--r--modules/communication/neomutt/macros.nix6
2 files changed, 30 insertions, 7 deletions
diff --git a/modules/communication/neomutt/account/default.nix b/modules/communication/neomutt/account/default.nix
index 0b75c9a..4d32ad7 100644
--- a/modules/communication/neomutt/account/default.nix
+++ b/modules/communication/neomutt/account/default.nix
@@ -20,7 +20,36 @@ in
description = "Specification of email accounts.";
};
- config = mkIf config.communication.neomutt.enable {
+ config = {
+ assertions = [
+ {
+ assertion =
+ !config.communication.neomutt.enable
+ || !lib.any (account: account.enable && account.passwordGopassSecret != null) (
+ lib.attrValues config.communication.neomutt.accounts
+ )
+ || config.security.gopass.enable;
+ message = ''
+ An enabled communication.neomutt account uses passwordGopassSecret but security.gopass.enable is not set.
+ Enable security.gopass to provide the account password command.
+ '';
+ }
+ {
+ assertion =
+ !config.communication.neomutt.enable
+ || !lib.any (account: account.enable && account.gpg.key != null) (
+ lib.attrValues config.communication.neomutt.accounts
+ )
+ || config.security.gpg.enable;
+ message = ''
+ An enabled communication.neomutt account specifies a GPG key but security.gpg.enable is not set.
+ Enable security.gpg to provide mail signing and encryption support.
+ '';
+ }
+ ];
+
+ }
+ // mkIf config.communication.neomutt.enable {
accounts.email.accounts = mapAttrs (
name: account:
let
diff --git a/modules/communication/neomutt/macros.nix b/modules/communication/neomutt/macros.nix
index e65436c..0548a0f 100644
--- a/modules/communication/neomutt/macros.nix
+++ b/modules/communication/neomutt/macros.nix
@@ -9,7 +9,6 @@
];
key = "O";
action = "<enter-command>set my_wait_key=$wait_key wait_key=no<enter><sync-mailbox><shell-escape>${lib.getExe config.scripts.neomutt-sync.package}<enter><sync-mailbox><enter-command>set wait_key=$my_wait_key<enter>";
- description = "sync mailbox (run neomutt-sync)";
}
{
# gx: extract links from the current message and open one, vim-netrw style
@@ -19,7 +18,6 @@
];
key = "gx";
action = "<pipe-message>urlscan<Enter>";
- description = "extract links from message (netrw-style)";
}
{
map = [
@@ -28,7 +26,6 @@
];
key = "gl";
action = "<shell-escape>less ~/.config/neomutt/flag_legend.txt<enter>";
- description = "show flag legend";
}
{
# gF: clear the current limit/filter and show every message again,
@@ -36,21 +33,18 @@
map = [ "index" ];
key = "gF";
action = "<limit>~A<enter>";
- description = "clear limit/filter, show all messages";
}
{
# ZZ: save and quit, vim-style (sync mailbox, then quit)
map = [ "index" ];
key = "ZZ";
action = "<sync-mailbox><quit>";
- description = "save changes and quit";
}
{
# ZQ: quit without saving, vim-style counterpart to ZZ
map = [ "index" ];
key = "ZQ";
action = "<exit>";
- description = "quit without saving";
}
];
}