diff options
| author | Arpit Chakladar <arpitchakladar@gmail.com> | 2026-09-19 19:48:42 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar@gmail.com> | 2026-09-19 19:48:42 +0530 |
| commit | 5159ebee1f1a7cdc3afb776c4557b6ab33e69930 (patch) | |
| tree | a168b563f09d5f1b16eaf78c7f91df43d6923afa /modules/communication/senpai/default.nix | |
| parent | 85341ca46a3e46a2b71c4cbc7413b8baa25845b5 (diff) | |
| download | home-manager-config-5159ebee1f1a7cdc3afb776c4557b6ab33e69930.tar.gz home-manager-config-5159ebee1f1a7cdc3afb776c4557b6ab33e69930.zip | |
feat(communication/senpai): added the IRC client senpai configurations
Diffstat (limited to 'modules/communication/senpai/default.nix')
| -rw-r--r-- | modules/communication/senpai/default.nix | 57 |
1 files changed, 57 insertions, 0 deletions
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 + ]; + }; + }; + }; +} |
