mirror of
https://github.com/kmein/niveum
synced 2026-03-22 21:01:07 +01:00
Compare commits
45 Commits
fe07e13848
...
grimm
| Author | SHA1 | Date | |
|---|---|---|---|
| d751ecdab7 | |||
| 2280b21a75 | |||
| de34cb6d66 | |||
| 3d6b34572d | |||
| ce0869c64b | |||
| a589332b42 | |||
| 5a6b32e0b4 | |||
| 6cf3072609 | |||
| 4fe122f06c | |||
| 4fa6a62966 | |||
|
|
dbdc876375 | ||
| eb79f88c59 | |||
| 8384363dcb | |||
| 797e53db7a | |||
| 426a82dff9 | |||
| 7264fce03c | |||
| b332784140 | |||
| ed51858a67 | |||
| ba13cd24a1 | |||
| 8331d11a50 | |||
| 79e14bfbc2 | |||
| eed0d0b2af | |||
| 5930340a05 | |||
| a5f6a46262 | |||
| 4eea890efc | |||
| b5232c1d81 | |||
| e1b1458bb0 | |||
| 1c05cccac0 | |||
| 0f80e80d1f | |||
| 06baeb8f1b | |||
| 3b08c19e02 | |||
| 5ad8f2843d | |||
| af3c018cc1 | |||
| 2493206ff9 | |||
| 985ff45e17 | |||
| ee373fcf3d | |||
| 04993972ce | |||
| 972b810d23 | |||
| 34576b51bc | |||
| 5c1f29f2e7 | |||
| bce13c9306 | |||
| b9a3ed40d6 | |||
| 9a11a00e4f | |||
| 5fa7957978 | |||
| 38946d1c20 |
29
.bin/anki-poem.sh
Executable file
29
.bin/anki-poem.sh
Executable file
@@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
file="${1?please supply a poetry file}"
|
||||||
|
[ -f "$file" ] || {
|
||||||
|
echo "'$file' is no file"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
poem="$(mktemp)"
|
||||||
|
clean () {
|
||||||
|
rm "$poem"
|
||||||
|
}
|
||||||
|
trap clean EXIT
|
||||||
|
sed '/^$/d' "$file" > "$poem"
|
||||||
|
|
||||||
|
htmlize() {
|
||||||
|
awk 'ORS="<br/>"' \
|
||||||
|
| head -c -5 # remove final <br/> characters
|
||||||
|
}
|
||||||
|
|
||||||
|
for line_number in $(seq 1 "$(wc -l "$poem" | cut -d' ' -f1)"); do
|
||||||
|
if [ "$line_number" -gt 3 ] && [ "$line_number" -gt 1 ]; then
|
||||||
|
sed -n "$((line_number - 3)),$((line_number - 1))p" "$poem"
|
||||||
|
else
|
||||||
|
sed -n "1,$((line_number - 1))p" "$poem"
|
||||||
|
fi | htmlize
|
||||||
|
printf '\t'
|
||||||
|
sed -n "${line_number},+1p" "$poem" | htmlize
|
||||||
|
printf '\n'
|
||||||
|
done
|
||||||
26
.bin/watson2fdf.sh
Executable file
26
.bin/watson2fdf.sh
Executable file
@@ -0,0 +1,26 @@
|
|||||||
|
project=Filli
|
||||||
|
year=2022
|
||||||
|
|
||||||
|
for month in Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec; do
|
||||||
|
from="$(date +%F -d "$month 1, $year")"
|
||||||
|
to="$(date +%F -d "$month 1, $year + 1 month")"
|
||||||
|
watson report --json --from "$from" --to "$to" --project "$project"
|
||||||
|
done | jq --slurp '
|
||||||
|
def in_array($arr):
|
||||||
|
. as $value | any($arr[]; . == $value);
|
||||||
|
|
||||||
|
map(
|
||||||
|
["engadin-app","fysiweb","val-muestair","mia-engiadina","ol"] as $official_projects
|
||||||
|
| (.timespan.from | .[0:7]) as $timespan
|
||||||
|
| .projects | .[0]
|
||||||
|
| .time as $total_time
|
||||||
|
| .tags
|
||||||
|
| select(. != null)
|
||||||
|
| map(select(.name | in_array($official_projects)))
|
||||||
|
| (map(.time)|add) as $official_time
|
||||||
|
| map({key:.name, value:.time}) | from_entries
|
||||||
|
| .other |= ($total_time - $official_time)
|
||||||
|
| map_values(. / (60*60) | ceil)
|
||||||
|
| .month |= $timespan
|
||||||
|
)
|
||||||
|
'
|
||||||
1
ci.nix
1
ci.nix
@@ -37,6 +37,7 @@
|
|||||||
"di.fm/key"
|
"di.fm/key"
|
||||||
"eduroam/identity"
|
"eduroam/identity"
|
||||||
"eduroam/password"
|
"eduroam/password"
|
||||||
|
"github/notification.token"
|
||||||
"hass/token"
|
"hass/token"
|
||||||
"mail/cock"
|
"mail/cock"
|
||||||
"mail/fastmail"
|
"mail/fastmail"
|
||||||
|
|||||||
@@ -30,6 +30,12 @@ in {
|
|||||||
tocharian-font = pkgs.callPackage <niveum/packages/tocharian-font.nix> {};
|
tocharian-font = pkgs.callPackage <niveum/packages/tocharian-font.nix> {};
|
||||||
iolanguage = pkgs.callPackage <niveum/packages/iolanguage.nix> {};
|
iolanguage = pkgs.callPackage <niveum/packages/iolanguage.nix> {};
|
||||||
ix = pkgs.callPackage <niveum/packages/ix.nix> {};
|
ix = pkgs.callPackage <niveum/packages/ix.nix> {};
|
||||||
|
rofi-pass = pkgs.rofi-pass.overrideAttrs (final: previous: {
|
||||||
|
patches = [
|
||||||
|
# password store androi
|
||||||
|
<niveum/packages/rofi-pass.patch>
|
||||||
|
];
|
||||||
|
});
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
overlays = [
|
overlays = [
|
||||||
@@ -138,7 +144,7 @@ in {
|
|||||||
cdt = "source ${cdt}";
|
cdt = "source ${cdt}";
|
||||||
vit = "$EDITOR $(mktemp)";
|
vit = "$EDITOR $(mktemp)";
|
||||||
tmux = "${pkgs.tmux}/bin/tmux -2";
|
tmux = "${pkgs.tmux}/bin/tmux -2";
|
||||||
sxiv = swallow "${pkgs.sxiv}/bin/sxiv";
|
sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv";
|
||||||
zathura = swallow "${pkgs.zathura}/bin/zathura";
|
zathura = swallow "${pkgs.zathura}/bin/zathura";
|
||||||
us = "${pkgs.systemd}/bin/systemctl --user";
|
us = "${pkgs.systemd}/bin/systemctl --user";
|
||||||
wcd = "source ${wcd}";
|
wcd = "source ${wcd}";
|
||||||
@@ -264,7 +270,7 @@ in {
|
|||||||
./ssh.nix
|
./ssh.nix
|
||||||
./sshd.nix
|
./sshd.nix
|
||||||
./sudo.nix
|
./sudo.nix
|
||||||
./sxiv.nix
|
./nsxiv.nix
|
||||||
./themes.nix
|
./themes.nix
|
||||||
./tmux.nix
|
./tmux.nix
|
||||||
./traadfri.nix
|
./traadfri.nix
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
corefonts
|
corefonts
|
||||||
crimson
|
crimson
|
||||||
eb-garamond
|
eb-garamond
|
||||||
|
font-awesome_6
|
||||||
etBook
|
etBook
|
||||||
ezra-sil
|
ezra-sil
|
||||||
fira
|
fira
|
||||||
@@ -20,7 +21,6 @@
|
|||||||
gentium
|
gentium
|
||||||
gfs-fonts
|
gfs-fonts
|
||||||
gyre-fonts
|
gyre-fonts
|
||||||
ia-writer-duospace
|
|
||||||
ibm-plex
|
ibm-plex
|
||||||
jetbrains-mono
|
jetbrains-mono
|
||||||
libertinus
|
libertinus
|
||||||
@@ -30,6 +30,8 @@
|
|||||||
ocr-a
|
ocr-a
|
||||||
roboto
|
roboto
|
||||||
roboto-mono
|
roboto-mono
|
||||||
|
noto-fonts
|
||||||
|
noto-fonts-cjk
|
||||||
noto-fonts-emoji
|
noto-fonts-emoji
|
||||||
roboto-slab
|
roboto-slab
|
||||||
scheherazade-new
|
scheherazade-new
|
||||||
@@ -42,13 +44,11 @@
|
|||||||
vollkorn
|
vollkorn
|
||||||
zilla-slab
|
zilla-slab
|
||||||
]; # google-fonts league-of-moveable-type
|
]; # google-fonts league-of-moveable-type
|
||||||
fontconfig.defaultFonts = let
|
fontconfig.defaultFonts = {
|
||||||
emojiFont = "Noto Emoji";
|
monospace = ["Noto Sans Mono"];
|
||||||
in {
|
serif = ["Noto Serif" "Noto Naskh Arabic" "Noto Serif Devanagari"];
|
||||||
monospace = ["JetBrains Mono" emojiFont];
|
sansSerif = ["Noto Sans Display" "Noto Kufi Arabic" "Noto Sans Devanagari" "Noto Sans CJK JP"];
|
||||||
serif = ["Merriweather"];
|
emoji = ["Noto Color Emoji" "Noto Emoji"];
|
||||||
sansSerif = ["Cantarell" emojiFont];
|
|
||||||
emoji = [emojiFont];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
(pkgs.writers.writeDashBin "hora-filli" ''
|
(pkgs.writers.writeDashBin "hora-filli" ''
|
||||||
${pkgs.hledger}/bin/hledger -f "${timeLedger}" register fillidefilla -O csv \
|
${pkgs.hledger}/bin/hledger -f "${timeLedger}" register fillidefilla -O csv \
|
||||||
-b "$(date -d "$(date +%Y-%m)-20 last month" +%Y-%m-%d)" \
|
-b "$(date -d "$(date +%Y-%m)-20 last month" +%Y-%m-%d)" \
|
||||||
-e "$(date -d "$(date +%Y-%m)-19" +%Y-%m-%d)" \
|
-e "$(date -d "$(date +%Y-%m)-20" +%Y-%m-%d)" \
|
||||||
| sed 's/(fillidefilla:\(.*\))/\1/g' \
|
| sed 's/(fillidefilla:\(.*\))/\1/g' \
|
||||||
| xsv select date,amount,total,account,description
|
| xsv select date,amount,total,account,description
|
||||||
'')
|
'')
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ in {
|
|||||||
{
|
{
|
||||||
workspaceButtons = false;
|
workspaceButtons = false;
|
||||||
fonts = {
|
fonts = {
|
||||||
names = ["Monospace"];
|
names = ["Monospace" "Font Awesome 6 Free"];
|
||||||
size = 8.0;
|
size = 8.0;
|
||||||
};
|
};
|
||||||
mode = "hide"; # "dock"
|
mode = "hide"; # "dock"
|
||||||
@@ -167,7 +167,7 @@ in {
|
|||||||
text = colours.foreground;
|
text = colours.foreground;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${
|
statusCommand = "env I3RS_GITHUB_TOKEN=${lib.strings.fileContents <secrets/github/notification.token>} ${pkgs.i3status-rust}/bin/i3status-rs ${
|
||||||
(pkgs.formats.toml {}).generate "i3status-rust.toml" (import <niveum/lib/i3status-rust.nix> {
|
(pkgs.formats.toml {}).generate "i3status-rust.toml" (import <niveum/lib/i3status-rust.nix> {
|
||||||
inherit (config.niveum) batteryName wirelessInterface;
|
inherit (config.niveum) batteryName wirelessInterface;
|
||||||
inherit colours;
|
inherit colours;
|
||||||
|
|||||||
@@ -7,8 +7,8 @@
|
|||||||
"application/pdf" = "org.pwmt.zathura.desktop";
|
"application/pdf" = "org.pwmt.zathura.desktop";
|
||||||
"application/vnd.oasis.opendocument.text" = "writer.desktop";
|
"application/vnd.oasis.opendocument.text" = "writer.desktop";
|
||||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" = "writer.desktop";
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" = "writer.desktop";
|
||||||
"image/jpeg" = "sxiv.desktop";
|
"image/jpeg" = "nsxiv.desktop";
|
||||||
"image/png" = "sxiv.desktop";
|
"image/png" = "nsxiv.desktop";
|
||||||
"image/vnd.djvu+multipage" = "org.pwmt.zathura.desktop";
|
"image/vnd.djvu+multipage" = "org.pwmt.zathura.desktop";
|
||||||
"text/html" = "brave-browser.desktop";
|
"text/html" = "brave-browser.desktop";
|
||||||
"text/markdown" = "nvim.desktop";
|
"text/markdown" = "nvim.desktop";
|
||||||
|
|||||||
@@ -5,131 +5,7 @@
|
|||||||
}: let
|
}: let
|
||||||
mainMailbox = "posteo";
|
mainMailbox = "posteo";
|
||||||
|
|
||||||
accounts.uni = {
|
accounts = import <niveum/lib/email.nix> {inherit lib mainMailbox;};
|
||||||
user = "meinhark";
|
|
||||||
password = lib.strings.fileContents <secrets/eduroam/password>;
|
|
||||||
address = "kieran.felix.meinhardt@hu-berlin.de";
|
|
||||||
imap = "mailbox.cms.hu-berlin.de";
|
|
||||||
smtp = "mailhost.cms.hu-berlin.de";
|
|
||||||
smtpSettings = smtp: "smtp://${smtp}";
|
|
||||||
folders = {
|
|
||||||
drafts = "Drafts";
|
|
||||||
sent = "Sent";
|
|
||||||
trash = "Trash";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
accounts.uni-old = {
|
|
||||||
user = "meinhark";
|
|
||||||
password = lib.strings.fileContents <secrets/eduroam/password>;
|
|
||||||
address = "meinhark@informatik.hu-berlin.de";
|
|
||||||
imap = "mailbox.informatik.hu-berlin.de";
|
|
||||||
smtp = "mailhost.informatik.hu-berlin.de";
|
|
||||||
smtpSettings = smtp: "smtp://${smtp}";
|
|
||||||
folders = {
|
|
||||||
drafts = "Drafts";
|
|
||||||
sent = "Sent";
|
|
||||||
trash = "Trash";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
accounts.work-uni = {
|
|
||||||
user = "meinhaki";
|
|
||||||
password = lib.strings.fileContents <secrets/mail/meinhaki>;
|
|
||||||
address = "kieran.meinhardt@hu-berlin.de";
|
|
||||||
imap = "mailbox.cms.hu-berlin.de";
|
|
||||||
smtp = "mailhost.cms.hu-berlin.de";
|
|
||||||
smtpSettings = smtp: "smtp://${smtp}";
|
|
||||||
folders = {
|
|
||||||
drafts = "Drafts";
|
|
||||||
sent = "Sent";
|
|
||||||
trash = "Trash";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
accounts.work-admin = {
|
|
||||||
user = "dslalewa";
|
|
||||||
password = lib.strings.fileContents <secrets/mail/dslalewa>;
|
|
||||||
address = "admin.alew.vglsprwi@hu-berlin.de";
|
|
||||||
imap = "mailbox.cms.hu-berlin.de";
|
|
||||||
smtp = "mailhost.cms.hu-berlin.de";
|
|
||||||
smtpSettings = smtp: "smtp://${smtp}";
|
|
||||||
folders = {
|
|
||||||
drafts = "Drafts";
|
|
||||||
sent = "Sent";
|
|
||||||
trash = "Trash";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
accounts.work-fysi = rec {
|
|
||||||
user = "kieran@fysi.tech";
|
|
||||||
address = user;
|
|
||||||
password = lib.strings.fileContents <secrets/mail/fastmail>;
|
|
||||||
imap = "imap.fastmail.com";
|
|
||||||
smtp = "smtp.fastmail.com";
|
|
||||||
smtpSettings = smtp: "smtps://${smtp}:465";
|
|
||||||
folders = {
|
|
||||||
drafts = "Drafts";
|
|
||||||
sent = "Sent";
|
|
||||||
trash = "Trash";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
accounts.cock = rec {
|
|
||||||
user = "2210@cock.li";
|
|
||||||
address = user;
|
|
||||||
password = lib.strings.fileContents <secrets/mail/cock>;
|
|
||||||
imap = "mail.cock.li";
|
|
||||||
smtp = imap;
|
|
||||||
smtpSettings = smtp: "smtp://${smtp}:587";
|
|
||||||
folders = {
|
|
||||||
drafts = "Drafts";
|
|
||||||
sent = "Sent";
|
|
||||||
trash = "Trash";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
accounts."${mainMailbox}" = rec {
|
|
||||||
user = "kieran.meinhardt@posteo.net";
|
|
||||||
address = user;
|
|
||||||
password = lib.strings.fileContents <secrets/mail/posteo>;
|
|
||||||
imap = "posteo.de";
|
|
||||||
smtp = imap;
|
|
||||||
smtpSettings = smtp: "smtp://${smtp}";
|
|
||||||
folders = {
|
|
||||||
drafts = "Drafts";
|
|
||||||
sent = "Sent";
|
|
||||||
trash = "Trash";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
accounts.google-amro = rec {
|
|
||||||
user = "amroplay@gmail.com";
|
|
||||||
address = user;
|
|
||||||
password = lib.strings.fileContents <secrets/mail/gmail/amroplay>;
|
|
||||||
imap = "imap.gmail.com";
|
|
||||||
smtp = "smtp.gmail.com";
|
|
||||||
smtpSettings = smtp: "smtps://${smtp}:465";
|
|
||||||
folders = {
|
|
||||||
drafts = "[Gmail]/Drafts";
|
|
||||||
sent = "[Gmail]/Sent Mail";
|
|
||||||
trash = "[Gmail]/Bin";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
accounts.google-kieran = rec {
|
|
||||||
user = "kieran.meinhardt@gmail.com";
|
|
||||||
address = user;
|
|
||||||
password = lib.strings.fileContents <secrets/mail/gmail/kieran.meinhardt>;
|
|
||||||
imap = "imap.gmail.com";
|
|
||||||
smtp = "smtp.gmail.com";
|
|
||||||
smtpSettings = smtp: "smtps://${smtp}:465";
|
|
||||||
folders = {
|
|
||||||
drafts = "[Gmail]/Entwürfe";
|
|
||||||
sent = "[Gmail]/Gesendet";
|
|
||||||
trash = "[Gmail]/Papierkorb";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in {
|
in {
|
||||||
environment.systemPackages = [pkgs.neomutt];
|
environment.systemPackages = [pkgs.neomutt];
|
||||||
environment.shellAliases.mua = "${pkgs.neomutt}/bin/neomutt -f ${mainMailbox}←";
|
environment.shellAliases.mua = "${pkgs.neomutt}/bin/neomutt -f ${mainMailbox}←";
|
||||||
@@ -149,7 +25,7 @@ in {
|
|||||||
pkgs.writeText "mailcap" ''
|
pkgs.writeText "mailcap" ''
|
||||||
text/plain; $EDITOR %s ;
|
text/plain; $EDITOR %s ;
|
||||||
text/html; ${pkgs.lynx}/bin/lynx -assume_charset=%{charset} -display_charset=utf-8 -dump %s; nametemplate=%s.html; copiousoutput;
|
text/html; ${pkgs.lynx}/bin/lynx -assume_charset=%{charset} -display_charset=utf-8 -dump %s; nametemplate=%s.html; copiousoutput;
|
||||||
image/*; ${pkgs.sxiv}/bin/sxiv %s ;
|
image/*; ${pkgs.nsxiv}/bin/nsxiv %s ;
|
||||||
video/*; ${pkgs.utillinux}/bin/setsid ${pkgs.mpv}/bin/mpv --quiet %s &; copiousoutput
|
video/*; ${pkgs.utillinux}/bin/setsid ${pkgs.mpv}/bin/mpv --quiet %s &; copiousoutput
|
||||||
audio/*; ${pkgs.mpv}/bin/mpv %s ;
|
audio/*; ${pkgs.mpv}/bin/mpv %s ;
|
||||||
application/pdf; ${pkgs.zathura}/bin/zathura %s ;
|
application/pdf; ${pkgs.zathura}/bin/zathura %s ;
|
||||||
@@ -239,11 +115,11 @@ in {
|
|||||||
color index red default '.*'
|
color index red default '.*'
|
||||||
color index_flags lightcyan default '.*'
|
color index_flags lightcyan default '.*'
|
||||||
color index_author yellow default '.*'
|
color index_author yellow default '.*'
|
||||||
color index_subject lightblack default '.*'
|
color index_subject default default '.*'
|
||||||
|
|
||||||
# New mail is boldened:
|
# New mail is boldened:
|
||||||
color index_author lightyellow black "~N"
|
color index_author lightyellow default "~N"
|
||||||
color index_subject lightwhite black "~N"
|
color index_subject lightwhite default "~N"
|
||||||
|
|
||||||
# Flagged mail is highlighted:
|
# Flagged mail is highlighted:
|
||||||
color index_flags lightmagenta default '~F'
|
color index_flags lightmagenta default '~F'
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
save-path ${newsboat-home}/saved/
|
save-path ${newsboat-home}/saved/
|
||||||
|
|
||||||
highlight all "---.*---" yellow default
|
highlight all "---.*---" yellow default
|
||||||
highlight feedlist ".*(0/0))" black default
|
# highlight feedlist ".*(0/0))" default default
|
||||||
highlight article "^Title:.*" yellow default bold
|
highlight article "^Title:.*" yellow default bold
|
||||||
highlight article "^Author:.*" yellow default
|
highlight article "^Author:.*" yellow default
|
||||||
highlight article "^Flags:.*" red default
|
highlight article "^Flags:.*" red default
|
||||||
@@ -58,14 +58,12 @@
|
|||||||
highlight article "\\[image [0-9][0-9]*\\]" color109 default bold
|
highlight article "\\[image [0-9][0-9]*\\]" color109 default bold
|
||||||
highlight article "\\[embedded flash: [0-9][0-9]*\\]" color66 default bold
|
highlight article "\\[embedded flash: [0-9][0-9]*\\]" color66 default bold
|
||||||
|
|
||||||
color background white default
|
|
||||||
color listnormal white default
|
|
||||||
color listnormal_unread white default bold
|
|
||||||
color listfocus blue default
|
color listfocus blue default
|
||||||
color listfocus_unread blue default bold
|
color listfocus_unread blue default bold
|
||||||
color info red default bold
|
color info red default bold
|
||||||
color article white default
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
newsboat-sql = "${pkgs.sqlite}/bin/sqlite3 ${newsboat-home}/cache.db";
|
||||||
in {
|
in {
|
||||||
nixpkgs.config.packageOverrides = pkgs: {
|
nixpkgs.config.packageOverrides = pkgs: {
|
||||||
newsboat = pkgs.writers.writeDashBin "newsboat" ''
|
newsboat = pkgs.writers.writeDashBin "newsboat" ''
|
||||||
@@ -76,15 +74,22 @@ in {
|
|||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.newsboat
|
pkgs.newsboat
|
||||||
(pkgs.writers.writeDashBin "newsboat-unread-count" ''
|
(pkgs.writers.writeDashBin "newsboat-unread-count" ''
|
||||||
printf "🆕"
|
|
||||||
if [ -f ${newsboat-home}/cache.db.lock ]; then
|
if [ -f ${newsboat-home}/cache.db.lock ]; then
|
||||||
echo ↻
|
${pkgs.jq}/bin/jq -n '{state: "Info", text: "↻", icon: "rss"}'
|
||||||
else
|
else
|
||||||
${pkgs.sqlite}/bin/sqlite3 ${newsboat-home}/cache.db "SELECT COUNT(DISTINCT id) FROM rss_item WHERE unread=1"
|
|
||||||
|
${pkgs.jq}/bin/jq -n \
|
||||||
|
--argjson unread "$(${newsboat-sql} "SELECT COUNT(DISTINCT id) FROM rss_item WHERE unread=1")" \
|
||||||
|
--argjson watchLater "$(${newsboat-sql} "SELECT COUNT(DISTINCT id) FROM rss_item WHERE flags='e' AND deleted=0")" \
|
||||||
|
'{
|
||||||
|
state: (if $unread > 0 then "Good" else "Idle" end),
|
||||||
|
text: (if $unread > 0 then "\($unread)" else "[\($watchLater)]" end),
|
||||||
|
icon: "rss"
|
||||||
|
}'
|
||||||
fi
|
fi
|
||||||
'')
|
'')
|
||||||
(pkgs.writers.writeDashBin "mpv-watch-later" ''
|
(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" \
|
${newsboat-sql} "SELECT url FROM rss_item WHERE flags='e' AND deleted=0 ORDER BY pubDate DESC" \
|
||||||
| ${pkgs.findutils}/bin/xargs ${pkgs.mpv}/bin/mpv
|
| ${pkgs.findutils}/bin/xargs ${pkgs.mpv}/bin/mpv
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -15,10 +15,10 @@
|
|||||||
cf ''${XDG_CONFIG_HOME:-$HOME/.config}
|
cf ''${XDG_CONFIG_HOME:-$HOME/.config}
|
||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
environment.systemPackages = [pkgs.sxiv];
|
environment.systemPackages = [pkgs.nsxiv];
|
||||||
|
|
||||||
# TODO fix
|
# TODO fix
|
||||||
home-manager.users.me.xdg.configFile."sxiv/exec/key-handler".source = pkgs.writers.writeDash "key-handler" ''
|
home-manager.users.me.xdg.configFile."nsxiv/exec/key-handler".source = pkgs.writers.writeDash "key-handler" ''
|
||||||
PATH=$PATH:${
|
PATH=$PATH:${
|
||||||
lib.makeBinPath [
|
lib.makeBinPath [
|
||||||
pkgs.gnused
|
pkgs.gnused
|
||||||
@@ -7,8 +7,16 @@
|
|||||||
inherit (import <niveum/lib>) sshPort kieran;
|
inherit (import <niveum/lib>) sshPort kieran;
|
||||||
externalNetwork = import <niveum/lib/external-network.nix>;
|
externalNetwork = import <niveum/lib/external-network.nix>;
|
||||||
sshIdentity = name: "${config.users.users.me.home}/.ssh/${name}";
|
sshIdentity = name: "${config.users.users.me.home}/.ssh/${name}";
|
||||||
|
ssh-passphease = lib.strings.fileContents <system-secrets/ssh/passphrase>;
|
||||||
in {
|
in {
|
||||||
services.xserver.displayManager.sessionCommands = "${pkgs.openssh}/bin/ssh-add";
|
services.xserver.displayManager.sessionCommands = toString (pkgs.writeScript "ssh-add" ''
|
||||||
|
#!${pkgs.expect}/bin/expect -f
|
||||||
|
spawn ${pkgs.openssh}/bin/ssh-add
|
||||||
|
expect "Enter passphrase for *:"
|
||||||
|
send "${ssh-passphrase}\n";
|
||||||
|
expect "Identity added: *"
|
||||||
|
interact
|
||||||
|
'');
|
||||||
|
|
||||||
programs.ssh.startAgent = true;
|
programs.ssh.startAgent = true;
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ in {
|
|||||||
./astrology.nix
|
./astrology.nix
|
||||||
./autorenkalender.nix
|
./autorenkalender.nix
|
||||||
./hesychius.nix
|
./hesychius.nix
|
||||||
|
./smyth.nix
|
||||||
./nachtischsatan.nix
|
./nachtischsatan.nix
|
||||||
./tlg-wotd.nix
|
./tlg-wotd.nix
|
||||||
<niveum/modules/telegram-bot.nix>
|
<niveum/modules/telegram-bot.nix>
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ in {
|
|||||||
command = "${pkgs.coreutils}/bin/shuf -n1 ${hesychius}";
|
command = "${pkgs.coreutils}/bin/shuf -n1 ${hesychius}";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.timers.telegram-bot-hesychius.timerConfig.RandomizedDelaySec = "10h";
|
||||||
|
|
||||||
niveum.passport.services = [
|
niveum.passport.services = [
|
||||||
{
|
{
|
||||||
title = "Hesychius of Alexandria Bot";
|
title = "Hesychius of Alexandria Bot";
|
||||||
|
|||||||
37
configs/telegram-bots/smyth.nix
Normal file
37
configs/telegram-bots/smyth.nix
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
niveum.telegramBots.smyth = {
|
||||||
|
enable = true;
|
||||||
|
time = "06/6:00";
|
||||||
|
token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
|
||||||
|
chatIds = ["@HerbertWeirSmyth"];
|
||||||
|
command = toString (pkgs.writers.writeDash "random-smyth" ''
|
||||||
|
set -efu
|
||||||
|
|
||||||
|
RANDOM_SECTION=$(
|
||||||
|
${pkgs.curl}/bin/curl -sSL http://www.perseus.tufts.edu/hopper/xmltoc?doc=Perseus%3Atext%3A1999.04.0007%3Asmythp%3D1 \
|
||||||
|
| ${pkgs.gnugrep}/bin/grep -o 'ref="[^"]*"' \
|
||||||
|
| ${pkgs.coreutils}/bin/shuf -n1 \
|
||||||
|
| ${pkgs.gnused}/bin/sed 's/^ref="//;s/"$//'
|
||||||
|
)
|
||||||
|
|
||||||
|
${pkgs.curl}/bin/curl -sSL http://www.perseus.tufts.edu/hopper/text?doc=$RANDOM_SECTION\
|
||||||
|
| ${pkgs.htmlq}/bin/htmlq '#text_main' \
|
||||||
|
| ${pkgs.gnused}/bin/sed 's/<\/\?hr>//g' \
|
||||||
|
| ${pkgs.pandoc}/bin/pandoc -f html -t plain --wrap=none
|
||||||
|
'');
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.timers.telegram-bot-smyth.timerConfig.RandomizedDelaySec = "3h";
|
||||||
|
|
||||||
|
niveum.passport.services = [
|
||||||
|
{
|
||||||
|
title = "Herbert Weir Smyth Bot";
|
||||||
|
description = "sends a random section from Smyth's Ancient Greek grammar to Telegram.";
|
||||||
|
link = "https://t.me/HerbertWeirSmyth";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
36
flake.lock
generated
36
flake.lock
generated
@@ -23,11 +23,11 @@
|
|||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1660330190,
|
"lastModified": 1661573386,
|
||||||
"narHash": "sha256-RgQUtZGmdb9fRkdBcI8x1KYuykbQCBaeY6ejFls7hFM=",
|
"narHash": "sha256-pBEg8iY00Af/SAtU2dlmOAv+2x7kScaGlFRDjNoVJO8=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "8675cfa549e1240c9d2abb1c878bc427eefcf926",
|
"rev": "d89bdff445eadff03fe414e9c30486bc8166b72b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -47,15 +47,15 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1644957911,
|
"lastModified": 1661273257,
|
||||||
"narHash": "sha256-ggie/j7pdBqzDs4W7OiPmhqH9IGbXAbJxGqBdVxA8jA=",
|
"narHash": "sha256-cywpSH3D291AwdO/ecJxHeN2Vuuz0cIy/NEXMsFT+Og=",
|
||||||
"owner": "Mic92",
|
"owner": "kmein",
|
||||||
"repo": "krops",
|
"repo": "krops",
|
||||||
"rev": "86fb3d2ee94fd8306231853b323ed8804edf26ec",
|
"rev": "542bc544ec8b0b807933a812d098e601683b0956",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "Mic92",
|
"owner": "kmein",
|
||||||
"repo": "krops",
|
"repo": "krops",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -110,11 +110,11 @@
|
|||||||
},
|
},
|
||||||
"nixos-stable": {
|
"nixos-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1660318005,
|
"lastModified": 1661520432,
|
||||||
"narHash": "sha256-g9WCa9lVUmOV6dYRbEPjv/TLOR5hamjeCcKExVGS3OQ=",
|
"narHash": "sha256-9z+WDeXiu3hobvSsL0SbHDx4s+kFmm8eussySuX4zCM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5c211b47aeadcc178c5320afd4e74c7eed5c389f",
|
"rev": "f11e12ac6af528c1ba12426ce83cee26f21ceafd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -195,11 +195,11 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1658436738,
|
"lastModified": 1662493500,
|
||||||
"narHash": "sha256-y075C4CE543ZdKPl1Byz8EPn67jbA59Z0bIsixNFsso=",
|
"narHash": "sha256-EdAEKDQ6z7oinqQ28ELE3+taJ106DgmhNJt/rpqHJic=",
|
||||||
"owner": "kmein",
|
"owner": "kmein",
|
||||||
"repo": "scripts",
|
"repo": "scripts",
|
||||||
"rev": "d5a38cf84e3f528641b1b10d9f33cf8bfcd5a52a",
|
"rev": "51c641ac3c1100d80313696663db70c2eb3698dc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -211,11 +211,11 @@
|
|||||||
"stockholm": {
|
"stockholm": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1660135264,
|
"lastModified": 1661246925,
|
||||||
"narHash": "sha256-F2L0osJCjmqkXddDVSBdBanq06XUBQoKXPf4iRJUKYA=",
|
"narHash": "sha256-hGNCF4m3SuVogqoipmJzNIKoh03S/SMnO5oMHgfHWjA=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "7ce87f5fdb602de7638b2df237e891e6038907ac",
|
"rev": "d1fa957ed5bf60767c83c96135f9142f6c96ea50",
|
||||||
"revCount": 10727,
|
"revCount": 10749,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://cgit.lassul.us/stockholm"
|
"url": "https://cgit.lassul.us/stockholm"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
inputs.nixpkgs.follows = "nixos-unstable";
|
inputs.nixpkgs.follows = "nixos-unstable";
|
||||||
};
|
};
|
||||||
krops = {
|
krops = {
|
||||||
url = "github:Mic92/krops";
|
url = "github:kmein/krops";
|
||||||
inputs.nixpkgs.follows = "nixos-stable";
|
inputs.nixpkgs.follows = "nixos-stable";
|
||||||
inputs.flake-utils.follows = "flake-utils";
|
inputs.flake-utils.follows = "flake-utils";
|
||||||
};
|
};
|
||||||
@@ -152,6 +152,7 @@
|
|||||||
toString (krops.packages.${system}.writeDeploy "deploy-${name}" {
|
toString (krops.packages.${system}.writeDeploy "deploy-${name}" {
|
||||||
source = krops.lib.evalSource [(source {inherit sources unstable name;})];
|
source = krops.lib.evalSource [(source {inherit sources unstable name;})];
|
||||||
target = "${user}@${host}:${toString sshPort}";
|
target = "${user}@${host}:${toString sshPort}";
|
||||||
|
useNixOutputMonitor = true;
|
||||||
});
|
});
|
||||||
in {
|
in {
|
||||||
apps.${system} = let
|
apps.${system} = let
|
||||||
|
|||||||
131
lib/email.nix
Normal file
131
lib/email.nix
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
mainMailbox ? "posteo",
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
uni = {
|
||||||
|
user = "meinhark";
|
||||||
|
password = lib.strings.fileContents <secrets/eduroam/password>;
|
||||||
|
address = "kieran.felix.meinhardt@hu-berlin.de";
|
||||||
|
imap = "mailbox.cms.hu-berlin.de";
|
||||||
|
smtp = "mailhost.cms.hu-berlin.de";
|
||||||
|
smtpSettings = smtp: "smtp://${smtp}";
|
||||||
|
folders = {
|
||||||
|
drafts = "Drafts";
|
||||||
|
sent = "Sent";
|
||||||
|
trash = "Trash";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
uni-old = {
|
||||||
|
user = "meinhark";
|
||||||
|
password = lib.strings.fileContents <secrets/eduroam/password>;
|
||||||
|
address = "meinhark@informatik.hu-berlin.de";
|
||||||
|
imap = "mailbox.informatik.hu-berlin.de";
|
||||||
|
smtp = "mailhost.informatik.hu-berlin.de";
|
||||||
|
smtpSettings = smtp: "smtp://${smtp}";
|
||||||
|
folders = {
|
||||||
|
drafts = "Drafts";
|
||||||
|
sent = "Sent";
|
||||||
|
trash = "Trash";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
work-uni = {
|
||||||
|
user = "meinhaki";
|
||||||
|
password = lib.strings.fileContents <secrets/mail/meinhaki>;
|
||||||
|
address = "kieran.meinhardt@hu-berlin.de";
|
||||||
|
imap = "mailbox.cms.hu-berlin.de";
|
||||||
|
smtp = "mailhost.cms.hu-berlin.de";
|
||||||
|
smtpSettings = smtp: "smtp://${smtp}";
|
||||||
|
folders = {
|
||||||
|
drafts = "Drafts";
|
||||||
|
sent = "Sent";
|
||||||
|
trash = "Trash";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
work-admin = {
|
||||||
|
user = "dslalewa";
|
||||||
|
password = lib.strings.fileContents <secrets/mail/dslalewa>;
|
||||||
|
address = "admin.alew.vglsprwi@hu-berlin.de";
|
||||||
|
imap = "mailbox.cms.hu-berlin.de";
|
||||||
|
smtp = "mailhost.cms.hu-berlin.de";
|
||||||
|
smtpSettings = smtp: "smtp://${smtp}";
|
||||||
|
folders = {
|
||||||
|
drafts = "Drafts";
|
||||||
|
sent = "Sent";
|
||||||
|
trash = "Trash";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
work-fysi = rec {
|
||||||
|
user = "kieran@fysi.tech";
|
||||||
|
address = user;
|
||||||
|
password = lib.strings.fileContents <secrets/mail/fastmail>;
|
||||||
|
imap = "imap.fastmail.com";
|
||||||
|
smtp = "smtp.fastmail.com";
|
||||||
|
smtpSettings = smtp: "smtps://${smtp}:465";
|
||||||
|
folders = {
|
||||||
|
drafts = "Drafts";
|
||||||
|
sent = "Sent";
|
||||||
|
trash = "Trash";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
cock = rec {
|
||||||
|
user = "2210@cock.li";
|
||||||
|
address = user;
|
||||||
|
password = lib.strings.fileContents <secrets/mail/cock>;
|
||||||
|
imap = "mail.cock.li";
|
||||||
|
smtp = imap;
|
||||||
|
smtpSettings = smtp: "smtp://${smtp}:587";
|
||||||
|
folders = {
|
||||||
|
drafts = "Drafts";
|
||||||
|
sent = "Sent";
|
||||||
|
trash = "Trash";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
"${mainMailbox}" = rec {
|
||||||
|
user = "kieran.meinhardt@posteo.net";
|
||||||
|
address = user;
|
||||||
|
password = lib.strings.fileContents <secrets/mail/posteo>;
|
||||||
|
imap = "posteo.de";
|
||||||
|
smtp = imap;
|
||||||
|
smtpSettings = smtp: "smtp://${smtp}";
|
||||||
|
folders = {
|
||||||
|
drafts = "Drafts";
|
||||||
|
sent = "Sent";
|
||||||
|
trash = "Trash";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
google-amro = rec {
|
||||||
|
user = "amroplay@gmail.com";
|
||||||
|
address = user;
|
||||||
|
password = lib.strings.fileContents <secrets/mail/gmail/amroplay>;
|
||||||
|
imap = "imap.gmail.com";
|
||||||
|
smtp = "smtp.gmail.com";
|
||||||
|
smtpSettings = smtp: "smtps://${smtp}:465";
|
||||||
|
folders = {
|
||||||
|
drafts = "[Gmail]/Drafts";
|
||||||
|
sent = "[Gmail]/Sent Mail";
|
||||||
|
trash = "[Gmail]/Bin";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
google-kieran = rec {
|
||||||
|
user = "kieran.meinhardt@gmail.com";
|
||||||
|
address = user;
|
||||||
|
password = lib.strings.fileContents <secrets/mail/gmail/kieran.meinhardt>;
|
||||||
|
imap = "imap.gmail.com";
|
||||||
|
smtp = "smtp.gmail.com";
|
||||||
|
smtpSettings = smtp: "smtps://${smtp}:465";
|
||||||
|
folders = {
|
||||||
|
drafts = "[Gmail]/Entwürfe";
|
||||||
|
sent = "[Gmail]/Gesendet";
|
||||||
|
trash = "[Gmail]/Papierkorb";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -10,17 +10,8 @@
|
|||||||
pkgs.writers.writeDash "setsid-command" ''
|
pkgs.writers.writeDash "setsid-command" ''
|
||||||
${pkgs.utillinux}/bin/setsid ${script}
|
${pkgs.utillinux}/bin/setsid ${script}
|
||||||
'';
|
'';
|
||||||
coronaBlock = {
|
|
||||||
block = "custom";
|
accounts = import <niveum/lib/email.nix> {inherit lib;};
|
||||||
interval = 60 * 2; # every two minutes
|
|
||||||
command = pkgs.writers.writeDash "corona" ''
|
|
||||||
${pkgs.curl}/bin/curl https://corona-stats.online/germany \
|
|
||||||
| ${pkgs.gnugrep}/bin/grep Germany \
|
|
||||||
| ${pkgs.gnused}/bin/sed 's/\s*//g' \
|
|
||||||
| ${pkgs.ansifilter}/bin/ansifilter \
|
|
||||||
| ${pkgs.gawk}/bin/awk -F'│' '{print "🤒 " $8 " 💀 " $5}'
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in {
|
in {
|
||||||
theme = {
|
theme = {
|
||||||
name = "plain";
|
name = "plain";
|
||||||
@@ -28,7 +19,7 @@ in {
|
|||||||
critical_fg = colours.red.bright;
|
critical_fg = colours.red.bright;
|
||||||
good_fg = colours.green.bright;
|
good_fg = colours.green.bright;
|
||||||
idle_fg = colours.foreground;
|
idle_fg = colours.foreground;
|
||||||
info_fg = colours.foreground;
|
info_fg = colours.cyan.bright;
|
||||||
warning_fg = colours.yellow.bright;
|
warning_fg = colours.yellow.bright;
|
||||||
warning_bg = colours.background;
|
warning_bg = colours.background;
|
||||||
alternating_tint_bg = colours.background;
|
alternating_tint_bg = colours.background;
|
||||||
@@ -42,54 +33,11 @@ in {
|
|||||||
separator_fg = colours.black.bright;
|
separator_fg = colours.black.bright;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
icons = {
|
icons.name = "awesome6";
|
||||||
name = "none";
|
icons.overrides.rss = "";
|
||||||
overrides = {
|
icons.overrides.vpn = "";
|
||||||
bat = "🔋";
|
icons.overrides.irc = "";
|
||||||
bat_charging = "🔌";
|
|
||||||
bat_discharging = "🔋";
|
|
||||||
bat_empty = " ";
|
|
||||||
bat_full = " ";
|
|
||||||
bat_half = " ";
|
|
||||||
bat_quarter = " ";
|
|
||||||
bat_three_quarters = " ";
|
|
||||||
cogs = "🚦 ";
|
|
||||||
cpu = "🖥 ";
|
|
||||||
disk_drive = "💽";
|
|
||||||
mail = "📧 ";
|
|
||||||
memory_mem = "🧠 ";
|
|
||||||
music = "🎵";
|
|
||||||
music_next = "⏭";
|
|
||||||
music_pause = "";
|
|
||||||
music_play = "▶";
|
|
||||||
music_prev = "⏮";
|
|
||||||
net_down = "❎";
|
|
||||||
net_up = "🌐";
|
|
||||||
net_vpn = "🛡 ";
|
|
||||||
net_wired = "🌐";
|
|
||||||
net_wireless = "📶";
|
|
||||||
pomodoro = "🍅 ";
|
|
||||||
time = "📅 ";
|
|
||||||
toggle_off = "👎";
|
|
||||||
toggle_on = "👍";
|
|
||||||
volume_empty = "🔈 ";
|
|
||||||
volume_full = "🔊 ";
|
|
||||||
volume_half = "🔉 ";
|
|
||||||
volume_muted = "🔇";
|
|
||||||
weather_clouds = "🌥";
|
|
||||||
weather_default = "🌡";
|
|
||||||
weather_rain = "🌧";
|
|
||||||
weather_snow = "🌨";
|
|
||||||
weather_sun = "🌣";
|
|
||||||
weather_thunder = "🌩";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
block = [
|
block = [
|
||||||
{
|
|
||||||
block = "custom";
|
|
||||||
interval = 5;
|
|
||||||
command = "newsboat-unread-count";
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
block = "weather";
|
block = "weather";
|
||||||
autolocate = true;
|
autolocate = true;
|
||||||
@@ -116,35 +64,109 @@ in {
|
|||||||
import astral.moon
|
import astral.moon
|
||||||
import astral.sun
|
import astral.sun
|
||||||
|
|
||||||
moon_phases = {
|
|
||||||
0: "🌑",
|
|
||||||
3.5: "🌒",
|
|
||||||
7: "🌓",
|
|
||||||
10.5: "🌔",
|
|
||||||
14: "🌕",
|
|
||||||
17.5: "🌖",
|
|
||||||
21: "🌗",
|
|
||||||
24.5: "🌘",
|
|
||||||
28: "🌑",
|
|
||||||
}
|
|
||||||
current_phase = astral.moon.phase()
|
current_phase = astral.moon.phase()
|
||||||
closest_phase = min(moon_phases.keys(), key=lambda x: abs(current_phase - x))
|
|
||||||
|
|
||||||
city = astral.LocationInfo("Berlin", "Germany", "${spacetime.time.timeZone}", ${toString spacetime.location.latitude}, ${toString spacetime.location.longitude})
|
city = astral.LocationInfo("Berlin", "Germany", "${spacetime.time.timeZone}", ${toString spacetime.location.latitude}, ${toString spacetime.location.longitude})
|
||||||
sun = astral.sun.sun(city.observer, date=astral.today(), tzinfo=city.timezone)
|
sun = astral.sun.sun(city.observer, date=astral.today(), tzinfo=city.timezone)
|
||||||
|
|
||||||
print("🌅 {} 🌇 {} {} {}".format(sun["sunrise"].strftime("%R"), sun["sunset"].strftime("%R"), moon_phases[closest_phase], round(current_phase, 1)))
|
print("↑{} ↓{} {}{}".format(sun["sunrise"].strftime("%R"), sun["sunset"].strftime("%R"), "☽" if current_phase < 14 else "☾", round(current_phase, 1)))
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
block = "github";
|
||||||
|
info = ["total"];
|
||||||
|
warning = ["mention" "review_requested"];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "custom";
|
||||||
|
interval = 10;
|
||||||
|
command = "newsboat-unread-count";
|
||||||
|
json = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "custom";
|
||||||
|
interval = 10;
|
||||||
|
command = pkgs.writers.writeDash "todo" ''
|
||||||
|
${pkgs.todoman}/bin/todo --porcelain | ${pkgs.jq}/bin/jq -r '
|
||||||
|
map(select(.due != null))
|
||||||
|
| (map(select(.due < now)) | length) as $overdue
|
||||||
|
| (map(select(.due >= now and .due < now + (60 * 60 * 24))) | length) as $dueToday
|
||||||
|
| {
|
||||||
|
icon: "tasks",
|
||||||
|
text: (($overdue + $dueToday) as $sum | if $sum > 0 then $sum | tostring else "" end),
|
||||||
|
state: (
|
||||||
|
if $overdue > 0 then
|
||||||
|
"Critical"
|
||||||
|
elif $dueToday > 0 then
|
||||||
|
"Warning"
|
||||||
|
else
|
||||||
|
"Idle"
|
||||||
|
end
|
||||||
|
)
|
||||||
|
}
|
||||||
|
'
|
||||||
|
'';
|
||||||
|
json = true;
|
||||||
|
hide_when_empty = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "custom";
|
||||||
|
interval = 60 * 5;
|
||||||
|
command = let
|
||||||
|
query-account = name: account: "${pkgs.writers.writeDash "query-imap-${name}" ''
|
||||||
|
${pkgs.coreutils}/bin/timeout 1 ${pkgs.curl}/bin/curl -sSL -u ${lib.escapeShellArg "${account.user}:${account.password}"} imaps://${account.imap} -X 'STATUS INBOX (UNSEEN)' \
|
||||||
|
| ${pkgs.gnugrep}/bin/grep -Eo '[0-9]+' \
|
||||||
|
| sed 's/^/{"${name}":/;s/$/}/'
|
||||||
|
''} &";
|
||||||
|
in
|
||||||
|
pkgs.writers.writeDash "unread-mail" ''
|
||||||
|
{
|
||||||
|
${lib.concatStringsSep "\n" (lib.mapAttrsToList query-account accounts)}
|
||||||
|
wait
|
||||||
|
} | jq -s 'if length == 0 then {text: "", icon: "mail", state: "Idle"} else
|
||||||
|
add
|
||||||
|
| (values | add) as $sum
|
||||||
|
| {
|
||||||
|
text: (if $sum > 0 then $sum | tostring else "" end),
|
||||||
|
icon: "mail",
|
||||||
|
state: (
|
||||||
|
if .uni > 0 or .["work-uni"] > 0 or .posteo > 0 then
|
||||||
|
"Warning"
|
||||||
|
elif $sum > 0 then
|
||||||
|
"Info"
|
||||||
|
else
|
||||||
|
"Idle"
|
||||||
|
end
|
||||||
|
)
|
||||||
|
} end'
|
||||||
|
'';
|
||||||
|
json = true;
|
||||||
|
hide_when_empty = true;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
block = "custom";
|
||||||
|
interval = 60;
|
||||||
|
command = pkgs.writers.writeDash "weechat" ''
|
||||||
|
ssh -o ConnectTimeout=1 makanek cat /var/lib/weechat/hotlist.txt | sed 's/,/\n/g' | wc -l | jq '{
|
||||||
|
text: (if . > 0 then . | tostring else "" end),
|
||||||
|
state: (if . > 0 then "Info" else "Idle" end),
|
||||||
|
icon: "irc"
|
||||||
|
}'
|
||||||
|
'';
|
||||||
|
json = true;
|
||||||
|
hide_when_empty = true;
|
||||||
|
}
|
||||||
{
|
{
|
||||||
block = "custom";
|
block = "custom";
|
||||||
interval = 5;
|
interval = 5;
|
||||||
command = pkgs.writers.writeDash "hu-berlin-vpn" ''
|
command = pkgs.writers.writeDash "hu-berlin-vpn" ''
|
||||||
PATH=${lib.makeBinPath [pkgs.systemd]}
|
PATH=${lib.makeBinPath [pkgs.systemd]}
|
||||||
(systemctl is-active --quiet openvpn-hu-berlin.service && echo "🎓👍 (OpenVPN)") \
|
(systemctl is-active --quiet openvpn-hu-berlin.service && echo '{"state": "Good", "text": "OpenVPN", "icon": "vpn"}') \
|
||||||
|| (systemctl is-active --quiet hu-vpn.service && echo "🎓👍 (PPP+SSL)") \
|
|| (systemctl is-active --quiet hu-vpn.service && echo '{"state": "Good", "text": "PPP+SSL", "icon": "vpn"}') \
|
||||||
|| echo "🎓👎"
|
|| echo '{"state": "Idle", "icon": "vpn", "text": ""}'
|
||||||
'';
|
'';
|
||||||
|
json = true;
|
||||||
|
hide_when_empty = true;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
block = "net";
|
block = "net";
|
||||||
@@ -171,9 +193,35 @@ in {
|
|||||||
}
|
}
|
||||||
{block = "load";}
|
{block = "load";}
|
||||||
{
|
{
|
||||||
block = "time";
|
block = "custom";
|
||||||
interval = 1;
|
interval = 1;
|
||||||
format = "%Y-%m-%d (%W %a) %H:%M";
|
json = true;
|
||||||
|
command = pkgs.writers.writeDash "time" ''
|
||||||
|
${pkgs.jq}/bin/jq -n \
|
||||||
|
--arg now "$(${pkgs.coreutils}/bin/date +'%Y-%m-%d (%W %a) %H:%M')" \
|
||||||
|
--argjson nextEvent "$(
|
||||||
|
${pkgs.khal}/bin/khal list --format "{start}" --day-format "" $(${pkgs.coreutils}/bin/date +'%Y-%m-%d %H:%M') 2>/dev/null \
|
||||||
|
| ${pkgs.gnugrep}/bin/grep -E '[0-9]{2}:[0-9]{2}' \
|
||||||
|
| ${pkgs.coreutils}/bin/head -1 \
|
||||||
|
| ${pkgs.coreutils}/bin/date --date="$(cat)" +%s
|
||||||
|
)" \
|
||||||
|
'{
|
||||||
|
text: $now,
|
||||||
|
icon: "time",
|
||||||
|
state: (
|
||||||
|
($nextEvent - now) as $deltaT
|
||||||
|
| if $deltaT < (5 * 60) then
|
||||||
|
"Critical"
|
||||||
|
elif $deltaT < (15 * 60) then
|
||||||
|
"Warning"
|
||||||
|
elif $deltaT < (60 * 60) then
|
||||||
|
"Info"
|
||||||
|
else
|
||||||
|
"Idle"
|
||||||
|
end
|
||||||
|
)
|
||||||
|
}'
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env node
|
#!/usr/bin/env node
|
||||||
const { createInterface } = require("readline");
|
const { createInterface } = require("readline");
|
||||||
const Sanscript = require("@sanskrit-coders/sanscript");
|
const Sanscript = require("@indic-transliteration/sanscript");
|
||||||
|
|
||||||
const rl = createInterface({
|
const rl = createInterface({
|
||||||
input: process.stdin,
|
input: process.stdin,
|
||||||
@@ -9,5 +9,9 @@ const rl = createInterface({
|
|||||||
});
|
});
|
||||||
|
|
||||||
rl.on("line", (line) => {
|
rl.on("line", (line) => {
|
||||||
console.log(Sanscript.t(line, "hk", "devanagari"));
|
console.log(
|
||||||
|
Sanscript.t(line, "hk", "devanagari")
|
||||||
|
.replace(/\.\./g, "॥")
|
||||||
|
.replace(/[,.]/g, "।")
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,6 +5,6 @@
|
|||||||
"bin": "devanagari.js",
|
"bin": "devanagari.js",
|
||||||
"author": "kmein",
|
"author": "kmein",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sanskrit-coders/sanscript": "^1.1.5"
|
"@indic-transliteration/sanscript": "^1.2.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,20 @@
|
|||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
"@sanskrit-coders/sanscript@^1.1.5":
|
"@indic-transliteration/common_maps@^1.0.0":
|
||||||
version "1.1.5"
|
version "1.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/@sanskrit-coders/sanscript/-/sanscript-1.1.5.tgz#a22222cf7a5d55f7b19e210242c59f6f819fd643"
|
resolved "https://registry.yarnpkg.com/@indic-transliteration/common_maps/-/common_maps-1.0.0.tgz#c1f1c893ae49e01fe498ef1877bdd0153bc90b42"
|
||||||
integrity sha512-YA7MchP2CD2JnAOkj+ORDUFrISiPqx3muvhKvRO3KFOx9UfvpIdEUORoKWJ88lr1uH9T32jDxjns/MSclmDczA==
|
integrity sha512-NUza2GKxc6/0YiWWew3qsFenEgksnFSZWvNGqyyKYnII9wZS/U+w1jY/yYN9aR+foA/rPymvckM2/hKv9Ow2dQ==
|
||||||
|
|
||||||
|
"@indic-transliteration/sanscript@^1.2.7":
|
||||||
|
version "1.2.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/@indic-transliteration/sanscript/-/sanscript-1.2.7.tgz#c07aaa979f6d60fb0bbf35cdbd1d3bb1c487d931"
|
||||||
|
integrity sha512-Jm5z+wWxMUlw6dGHK7BHQUBjRnVHmfidmB7NiTbkdKPP89BDOB16zIKvXZY5XTsvkXmcyqF+DbJqiB9zzUhDKA==
|
||||||
|
dependencies:
|
||||||
|
"@indic-transliteration/common_maps" "^1.0.0"
|
||||||
|
toml "^2.3.6"
|
||||||
|
|
||||||
|
toml@^2.3.6:
|
||||||
|
version "2.3.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/toml/-/toml-2.3.6.tgz#25b0866483a9722474895559088b436fd11f861b"
|
||||||
|
integrity sha512-gVweAectJU3ebq//Ferr2JUY4WKSDe5N+z0FvjDncLGyHmIDoxgY/2Ie4qfEIDm4IS7OA6Rmdm7pdEEdMcV/xQ==
|
||||||
|
|||||||
12
packages/rofi-pass.patch
Normal file
12
packages/rofi-pass.patch
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
diff --git a/rofi-pass b/rofi-pass
|
||||||
|
index 48928db..13682a5 100755
|
||||||
|
--- a/rofi-pass
|
||||||
|
+++ b/rofi-pass
|
||||||
|
@@ -15,7 +15,7 @@ _image_viewer () {
|
||||||
|
|
||||||
|
# We expect to find these fields in pass(1)'s output
|
||||||
|
URL_field='url'
|
||||||
|
-USERNAME_field='user'
|
||||||
|
+USERNAME_field='login'
|
||||||
|
AUTOTYPE_field='autotype'
|
||||||
|
OTPmethod_field='otp_method'
|
||||||
@@ -96,7 +96,7 @@ in
|
|||||||
rm "$file"
|
rm "$file"
|
||||||
}
|
}
|
||||||
${pkgs.qrencode}/bin/qrencode "$(${pkgs.xclip}/bin/xclip -selection clipboard -out)" -o "$file"
|
${pkgs.qrencode}/bin/qrencode "$(${pkgs.xclip}/bin/xclip -selection clipboard -out)" -o "$file"
|
||||||
${pkgs.sxiv}/bin/sxiv "$file"
|
${pkgs.nsxiv}/bin/nsxiv "$file"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
ttspaste = pkgs.writers.writeDashBin "ttspaste" ''
|
ttspaste = pkgs.writers.writeDashBin "ttspaste" ''
|
||||||
@@ -123,7 +123,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
meteo = wrapScript {
|
meteo = wrapScript {
|
||||||
packages = [pkgs.jq pkgs.curl pkgs.xdotool pkgs.sxiv pkgs.gnused];
|
packages = [pkgs.jq pkgs.curl pkgs.xdotool pkgs.nsxiv pkgs.gnused];
|
||||||
script = ./meteo.sh;
|
script = ./meteo.sh;
|
||||||
name = "meteo";
|
name = "meteo";
|
||||||
};
|
};
|
||||||
@@ -433,7 +433,7 @@ in
|
|||||||
scanned = pkgs.writers.writeDashBin "scanned" ''
|
scanned = pkgs.writers.writeDashBin "scanned" ''
|
||||||
[ $# -eq 1 -a -f "$1" -a -r "$1" ] || exit 1
|
[ $# -eq 1 -a -f "$1" -a -r "$1" ] || exit 1
|
||||||
|
|
||||||
${pkgs.imagemagick}/bin/convert -density 150 "$1" -colorspace gray -linear-stretch 3.5%x10% -blur 0x0.5 -attenuate 0.25 +noise Gaussian "scanned-$1"
|
${pkgs.imagemagick}/bin/convert -density 150 "$1" -rotate 0.5 -attenuate 0.25 +noise Multiplicative -colorspace Gray "scanned-$1"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nix-index-update = pkgs.writers.writeDashBin "nix-index-update" ''
|
nix-index-update = pkgs.writers.writeDashBin "nix-index-update" ''
|
||||||
|
|||||||
@@ -69,8 +69,8 @@ curl -sSL \
|
|||||||
"http://wetterstationen.meteomedia.de/messnetz/vorhersagegrafik/$station.png" \
|
"http://wetterstationen.meteomedia.de/messnetz/vorhersagegrafik/$station.png" \
|
||||||
-o "$cache"
|
-o "$cache"
|
||||||
|
|
||||||
if window_id=$(xdotool search --name "^sxiv - $cache$"); then
|
if window_id=$(xdotool search --name "^nsxiv - $cache$"); then
|
||||||
xdotool key --window "$window_id" r
|
xdotool key --window "$window_id" r
|
||||||
else
|
else
|
||||||
sxiv "$cache" &
|
nsxiv "$cache" &
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -76,8 +76,14 @@ in
|
|||||||
# ref https://github.com/LukeSmithxyz/voidrice/blob/9fe6802122f6e0392c7fe20eefd30437771d7f8e/.local/bin/dmenuunicode
|
# ref https://github.com/LukeSmithxyz/voidrice/blob/9fe6802122f6e0392c7fe20eefd30437771d7f8e/.local/bin/dmenuunicode
|
||||||
writers.writeDashBin "unicodmenu" ''
|
writers.writeDashBin "unicodmenu" ''
|
||||||
history_file=$HOME/.cache/unicodmenu
|
history_file=$HOME/.cache/unicodmenu
|
||||||
PATH=${lib.makeBinPath [coreutils dmenu gnused libnotify xclip xdotool]}
|
PATH=${lib.makeBinPath [coreutils dmenu gawk gnused libnotify xclip xdotool]}
|
||||||
chosen=$(cat "$history_file" ${kaomoji-file} ${unicode-file} | dmenu -p unicode -i -l 10 | tee --append "$history_file" | sed "s/ .*//")
|
|
||||||
|
all_characters() {
|
||||||
|
tac "$history_file"
|
||||||
|
cat ${kaomoji-file} ${unicode-file}
|
||||||
|
}
|
||||||
|
|
||||||
|
chosen=$(all_characters | awk '!seen[$0]++' | dmenu -p unicode -i -l 10 | tee --append "$history_file" | sed "s/ .*//")
|
||||||
|
|
||||||
[ "$chosen" != "" ] || exit
|
[ "$chosen" != "" ] || exit
|
||||||
|
|
||||||
|
|||||||
33
packages/weechatScripts/hotlist2extern.nix
Normal file
33
packages/weechatScripts/hotlist2extern.nix
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
stdenv,
|
||||||
|
lib,
|
||||||
|
fetchurl,
|
||||||
|
weechat,
|
||||||
|
}:
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "hotlist2extern";
|
||||||
|
version = "1.0";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://raw.githubusercontent.com/weechat/scripts/dd627975cf2e464f206f8006cb3963c8ee82044c/perl/hotlist2extern.pl";
|
||||||
|
sha256 = "1flpikm1kq6m9rh3hmafni9f2yi1b90w539k3hj55a5c9gddp2lr";
|
||||||
|
};
|
||||||
|
|
||||||
|
dontUnpack = true;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/share
|
||||||
|
cp $src $out/share/hotlist2extern.pl
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
scripts = ["hotlist2extern.pl"];
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
inherit (weechat.meta) platforms;
|
||||||
|
description = "Give hotlist to an external file/program";
|
||||||
|
license = licenses.gpl3;
|
||||||
|
maintainers = with maintainers; [kmein];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -17,6 +17,7 @@ in {
|
|||||||
./monitoring
|
./monitoring
|
||||||
./moodle-dl-borsfaye.nix
|
./moodle-dl-borsfaye.nix
|
||||||
./names.nix
|
./names.nix
|
||||||
|
./grimm.nix
|
||||||
./nextcloud.nix
|
./nextcloud.nix
|
||||||
./radio-news.nix
|
./radio-news.nix
|
||||||
./radio.nix
|
./radio.nix
|
||||||
@@ -103,5 +104,11 @@ in {
|
|||||||
defaults.email = kieran.email;
|
defaults.email = kieran.email;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [pkgs.vim pkgs.git pkgs.tmux pkgs.python3];
|
environment.systemPackages = [
|
||||||
|
pkgs.vim
|
||||||
|
pkgs.git
|
||||||
|
pkgs.tmux
|
||||||
|
pkgs.python3
|
||||||
|
pkgs.nix-output-monitor
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
30
systems/makanek/grimm.nix
Normal file
30
systems/makanek/grimm.nix
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{pkgs, ...}: let
|
||||||
|
port = 9610;
|
||||||
|
web-socket-sink-src = "${<scripts>}/grimm-scroller";
|
||||||
|
web-socket-sink = pkgs.callPackage web-socket-sink-src {};
|
||||||
|
lemmata = "${web-socket-sink-src}/dwb-compact.json";
|
||||||
|
in {
|
||||||
|
systemd.services.grimm-ws = {
|
||||||
|
wantedBy = ["multi-user.target"];
|
||||||
|
script = "${web-socket-sink}/bin/web-socket-sink --host 0.0.0.0 --port ${toString port} < ${lemmata}";
|
||||||
|
serviceConfig = {
|
||||||
|
Restart = "always";
|
||||||
|
DynamicUser = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."grimm.kmein.de" = {
|
||||||
|
enableACME = false;
|
||||||
|
forceSSL = false;
|
||||||
|
locations = {
|
||||||
|
"/".root = pkgs.linkFarm "grimm" [
|
||||||
|
{
|
||||||
|
name = "index.html";
|
||||||
|
path = "${web-socket-sink-src}/wclient.html";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [port];
|
||||||
|
}
|
||||||
@@ -114,6 +114,10 @@
|
|||||||
url = "https://www.deutschlandfunk.de/meine-nacht-schlaeft-nicht-pflanze-mich-nicht-in-dein-herz.700.de.html?dram:article_id=486475";
|
url = "https://www.deutschlandfunk.de/meine-nacht-schlaeft-nicht-pflanze-mich-nicht-in-dein-herz.700.de.html?dram:article_id=486475";
|
||||||
filter = [{element-by-class = "dlf-articledetail";} "html2text" "strip"];
|
filter = [{element-by-class = "dlf-articledetail";} "html2text" "strip"];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
name = "Ist der Congress schon abgesagt?";
|
||||||
|
url = "https://ist-der-congress-schon-abgesagt.de/";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
name = "fxght.or.flxght";
|
name = "fxght.or.flxght";
|
||||||
url = "https://api.tellonym.me/profiles/name/fxght.or.flxght?limit=20";
|
url = "https://api.tellonym.me/profiles/name/fxght.or.flxght?limit=20";
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
}: let
|
}: let
|
||||||
inherit (import <niveum/lib>) kieran;
|
inherit (import <niveum/lib>) kieran;
|
||||||
relayPassword = lib.fileContents <system-secrets/weechat/relay>;
|
relayPassword = lib.fileContents <system-secrets/weechat/relay>;
|
||||||
|
weechatHome = "/var/lib/weechat";
|
||||||
in {
|
in {
|
||||||
systemd.services.weechat = let
|
systemd.services.weechat = let
|
||||||
tmux = pkgs.writers.writeDash "tmux" ''
|
tmux = pkgs.writers.writeDash "tmux" ''
|
||||||
@@ -31,6 +32,7 @@ in {
|
|||||||
pkgs.weechatScripts.weechat-autosort
|
pkgs.weechatScripts.weechat-autosort
|
||||||
pkgs.weechatScripts.colorize_nicks
|
pkgs.weechatScripts.colorize_nicks
|
||||||
pkgs.weechatScripts.weechat-matrix
|
pkgs.weechatScripts.weechat-matrix
|
||||||
|
(pkgs.callPackage <niveum/packages/weechatScripts/hotlist2extern.nix> {})
|
||||||
];
|
];
|
||||||
settings = let
|
settings = let
|
||||||
nick = "kmein";
|
nick = "kmein";
|
||||||
@@ -106,6 +108,13 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
logger.level.irc.news = 0;
|
logger.level.irc.news = 0;
|
||||||
|
plugins.var.perl.hotlist2extern = {
|
||||||
|
external_command_hotlist = "echo %X > ${weechatHome}/hotlist.txt";
|
||||||
|
external_command_hotlist_empty = "echo -n %X > ${weechatHome}/hotlist.txt";
|
||||||
|
lowest_priority = "2";
|
||||||
|
use_title = "off";
|
||||||
|
delimiter = ",";
|
||||||
|
};
|
||||||
matrix.server.nibbana = {
|
matrix.server.nibbana = {
|
||||||
address = "nibbana.jp";
|
address = "nibbana.jp";
|
||||||
username = nick;
|
username = nick;
|
||||||
@@ -163,7 +172,7 @@ in {
|
|||||||
wantedBy = ["multi-user.target"];
|
wantedBy = ["multi-user.target"];
|
||||||
restartIfChanged = true;
|
restartIfChanged = true;
|
||||||
path = [pkgs.alacritty.terminfo];
|
path = [pkgs.alacritty.terminfo];
|
||||||
environment.WEECHAT_HOME = "/var/lib/weechat";
|
environment.WEECHAT_HOME = weechatHome;
|
||||||
preStart = "${pkgs.coreutils}/bin/rm $WEECHAT_HOME/*.conf";
|
preStart = "${pkgs.coreutils}/bin/rm $WEECHAT_HOME/*.conf";
|
||||||
script = "${tmux} -2 new-session -d -s IM ${weechat}/bin/weechat";
|
script = "${tmux} -2 new-session -d -s IM ${weechat}/bin/weechat";
|
||||||
preStop = "${tmux} kill-session -t IM";
|
preStop = "${tmux} kill-session -t IM";
|
||||||
|
|||||||
Reference in New Issue
Block a user