From 5159ebee1f1a7cdc3afb776c4557b6ab33e69930 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Sat, 19 Sep 2026 19:48:42 +0530 Subject: feat(communication/senpai): added the IRC client senpai configurations --- modules/communication/senpai/default.nix | 57 ++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 modules/communication/senpai/default.nix (limited to 'modules/communication/senpai/default.nix') diff --git a/modules/communication/senpai/default.nix b/modules/communication/senpai/default.nix new file mode 100644 index 0000000..51fc041 --- /dev/null +++ b/modules/communication/senpai/default.nix @@ -0,0 +1,57 @@ +# Senpai TUI IRC client module +{ + config, + lib, + pkgs, + ... +}: +{ + imports = [ ./assertions.nix ]; + + options.communication.senpai = { + enable = lib.mkEnableOption "Senpai TUI IRC client"; + + package = lib.mkOption { + type = lib.types.package; + default = pkgs.senpai; + description = "The senpai package to use."; + }; + + server = { + address = lib.mkOption { + type = lib.types.str; + description = "IRC server address (host[:port]). Supports irc://, ircs://, irc+insecure:// URLs."; + }; + }; + + identity = { + nickname = lib.mkOption { + type = lib.types.str; + description = "Your IRC nickname (no spaces or colons)."; + }; + + passwordGopassSecret = lib.mkOption { + type = lib.types.nullOr lib.types.str; + default = null; + description = "Gopass secret path for SASL password (e.g. irc/user@server). Constructs password-cmd automatically."; + }; + }; + }; + + config = lib.mkIf config.communication.senpai.enable { + programs.senpai = { + enable = true; + package = config.communication.senpai.package; + config = { + address = config.communication.senpai.server.address; + nickname = config.communication.senpai.identity.nickname; + password-cmd = lib.mkIf (config.communication.senpai.identity.passwordGopassSecret != null) [ + (lib.getExe config.security.gopass.package) + "show" + "-o" + config.communication.senpai.identity.passwordGopassSecret + ]; + }; + }; + }; +} -- cgit v1.2.3