mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
improvement: use more nix library functions
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (lib.attrsets) nameValuePair listToAttrs;
|
||||
inherit (lib.lists) imap0;
|
||||
in
|
||||
{
|
||||
home-manager.users.me.xresources.properties = with config.niveum; {
|
||||
"*background" = colours.background;
|
||||
@@ -8,5 +12,5 @@
|
||||
"*.font" = "xft:${fonts.terminal.name}:size=${toString fonts.terminal.size}";
|
||||
"*.boldFont" = "xft:${fonts.terminal.name}:style=Bold:size=${toString fonts.terminal.size}";
|
||||
"*.italicFont" = "xft:${fonts.terminal.name}:style=Italic:size=${toString fonts.terminal.size}";
|
||||
} // lib.lists.foldr (i: cs: cs // { "*color${toString i}" = builtins.elemAt colourPalette i; }) {} (lib.lists.range 0 15);
|
||||
} // listToAttrs (imap0 (i: c: nameValuePair "*color${toString i}" c) colourPalette);
|
||||
}
|
||||
|
||||
@@ -12,8 +12,7 @@ let
|
||||
${pkgs.curl}/bin/curl -s -X POST "https://api.telegram.org/bot${bot.token}/sendMessage" \
|
||||
-d chat_id="${chatId}" \
|
||||
-d text="$QUOTE" ${
|
||||
if bot.parseMode == null then ""
|
||||
else "-d parse_mode=${bot.parseMode}"
|
||||
lib.strings.optionalString (bot.parseMode != null) "-d parse_mode=${bot.parseMode}"
|
||||
}
|
||||
'') bot.chatIds);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user