mirror of
https://github.com/kmein/niveum
synced 2026-03-22 12:51:08 +01:00
Compare commits
3 Commits
f805e3a076
...
5bc26ddc12
| Author | SHA1 | Date | |
|---|---|---|---|
| 5bc26ddc12 | |||
| 5a16a90a8a | |||
| 44501db7fb |
@@ -217,6 +217,11 @@ in {
|
||||
"${modifier}+r" = "mode resize";
|
||||
"${modifier}+v" = "split v";
|
||||
"${modifier}+w" = "layout tabbed";
|
||||
"${modifier}+q" = "exec ${pkgs.writers.writeDash "newsboat-sync" ''
|
||||
notify-send --app-name="newsboat" "Updating ..."
|
||||
newsboat -x reload
|
||||
notify-send --app-name="newsboat" "Finished updating."
|
||||
''}";
|
||||
|
||||
# "${modifier}+Shift+y" = "exec ${pkgs.qutebrowser}/bin/qutebrowser";
|
||||
"${modifier}+Return" = "exec ${(defaultApplications pkgs).terminal}";
|
||||
|
||||
@@ -75,6 +75,14 @@ in {
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.newsboat
|
||||
(pkgs.writers.writeDashBin "newsboat-unread-count" ''
|
||||
printf "🆕"
|
||||
if [ -f ${newsboat-home}/cache.db.lock ]; then
|
||||
echo ↻
|
||||
else
|
||||
${pkgs.sqlite}/bin/sqlite3 ${newsboat-home}/cache.db "SELECT COUNT(DISTINCT id) FROM rss_item WHERE unread=1"
|
||||
fi
|
||||
'')
|
||||
(pkgs.writers.writeDashBin "mpv-watch-later" ''
|
||||
${pkgs.sqlite}/bin/sqlite3 ${newsboat-home}/cache.db "SELECT url FROM rss_item WHERE flags='e' AND deleted=0 ORDER BY pubDate DESC" \
|
||||
| ${pkgs.findutils}/bin/xargs ${pkgs.mpv}/bin/mpv
|
||||
|
||||
@@ -123,7 +123,7 @@ in {
|
||||
electrum
|
||||
inkscape
|
||||
astrolog
|
||||
anki # flashcards
|
||||
anki-bin # flashcards
|
||||
jbofihe # lojbanic software
|
||||
zoom-us # video conferencing
|
||||
alejandra # nix formatter
|
||||
|
||||
@@ -18,6 +18,7 @@ in {
|
||||
./literature-quote.nix
|
||||
./astrology.nix
|
||||
./autorenkalender.nix
|
||||
./hesychius.nix
|
||||
./nachtischsatan.nix
|
||||
./tlg-wotd.nix
|
||||
<niveum/modules/telegram-bot.nix>
|
||||
|
||||
24
configs/telegram-bots/hesychius.nix
Normal file
24
configs/telegram-bots/hesychius.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
hesychius = <scripts> + "/hesychius/hesychius.txt";
|
||||
in {
|
||||
niveum.telegramBots.hesychius = {
|
||||
enable = true;
|
||||
time = "08:00";
|
||||
token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
|
||||
chatIds = ["@HesychiosAlexandreus"];
|
||||
parseMode = "Markdown";
|
||||
command = "${pkgs.coreutils}/bin/shuf -n1 ${hesychius}";
|
||||
};
|
||||
|
||||
niveum.passport.services = [
|
||||
{
|
||||
title = "Hesychius of Alexandria Bot";
|
||||
description = "sends a random word from Hesychius of Alexandria's lexicon to Telegram.";
|
||||
link = "https://t.me/HesychiosAlexandreus";
|
||||
}
|
||||
];
|
||||
}
|
||||
6
flake.lock
generated
6
flake.lock
generated
@@ -195,11 +195,11 @@
|
||||
"scripts": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1657447671,
|
||||
"narHash": "sha256-SjKlNLllYdW/OHLk55hh23E3XsBU+R0Pu18LXfsxgH0=",
|
||||
"lastModified": 1658427979,
|
||||
"narHash": "sha256-5W0omdIH6SAZyXSASxdlDK9+u8vbwAlHdh5gAEP+QHQ=",
|
||||
"owner": "kmein",
|
||||
"repo": "scripts",
|
||||
"rev": "0bfb5d29cbd948a82d2a1c274bc0d374a88c9c88",
|
||||
"rev": "9b945b3f38297b1cbd6a9efe337c0805d6e2997d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -85,6 +85,11 @@ in {
|
||||
};
|
||||
};
|
||||
block = [
|
||||
{
|
||||
block = "custom";
|
||||
interval = 5;
|
||||
command = "newsboat-unread-count";
|
||||
}
|
||||
{
|
||||
block = "weather";
|
||||
autolocate = true;
|
||||
|
||||
Reference in New Issue
Block a user