nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit 7623eac4d1c8d39bb69b1fb335ef594384250f18
parent 6872ee53cfe856a2d6c63cf4e0a5b8813336d115
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Thu, 23 Apr 2020 16:35:27 +0300

Add slack-term module

Diffstat:
Mmodules/default.nix | 1+
Amodules/home-manager/programs/slack-term.nix | 51+++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/modules/default.nix b/modules/default.nix @@ -4,6 +4,7 @@ goldendict = ./home-manager/programs/goldendict.nix; gpxsee = ./home-manager/programs/gpxsee.nix; qmapshack = ./home-manager/programs/qmapshack.nix; + slack-term = ./home-manager/programs/slack-term.nix; }; }; } diff --git a/modules/home-manager/programs/slack-term.nix b/modules/home-manager/programs/slack-term.nix @@ -0,0 +1,51 @@ +{ config, lib, pkgs, ... }: + +with lib; +let + cfg = config.programs.slack-term; +in +{ + meta.maintainers = with maintainers; [ sikmir ]; + + options.programs.slack-term = { + enable = mkEnableOption "Slack client for your terminal"; + + package = mkOption { + default = pkgs.slack-term; + defaultText = literalExample "pkgs.slack-term"; + description = "slack-term package to install."; + type = types.package; + }; + + token = mkOption { + description = "Slack token."; + type = types.str; + }; + }; + + config = mkIf cfg.enable { + home.packages = [ cfg.package ]; + + home.file.".slack-term".text = '' + { + "slack_token": "${cfg.token}", + "sidebar_width": 2, + "notify": "mention", + "emoji": true, + "theme": { + "message": { + "time_format": "02/01 15:04", + "time": "fg-green,fg-bold", + "name": "colorize,fg-bold", + "text": "fg-white" + }, + "channel": { + "prefix": "fg-red,fg-bold", + "icon": "fg-green,fg-bold", + "text": "fg-blue,fg-bold" + } + } + } + ''; + }; +}