mirror of
https://github.com/kmein/niveum
synced 2026-03-23 05:11:08 +01:00
Compare commits
1 Commits
grimm
...
bc51c93740
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc51c93740 |
1
ci.nix
1
ci.nix
@@ -37,7 +37,6 @@
|
||||
"di.fm/key"
|
||||
"eduroam/identity"
|
||||
"eduroam/password"
|
||||
"github/notification.token"
|
||||
"hass/token"
|
||||
"mail/cock"
|
||||
"mail/fastmail"
|
||||
|
||||
@@ -30,12 +30,6 @@ in {
|
||||
tocharian-font = pkgs.callPackage <niveum/packages/tocharian-font.nix> {};
|
||||
iolanguage = pkgs.callPackage <niveum/packages/iolanguage.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 = [
|
||||
@@ -144,7 +138,7 @@ in {
|
||||
cdt = "source ${cdt}";
|
||||
vit = "$EDITOR $(mktemp)";
|
||||
tmux = "${pkgs.tmux}/bin/tmux -2";
|
||||
sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv";
|
||||
sxiv = swallow "${pkgs.sxiv}/bin/sxiv";
|
||||
zathura = swallow "${pkgs.zathura}/bin/zathura";
|
||||
us = "${pkgs.systemd}/bin/systemctl --user";
|
||||
wcd = "source ${wcd}";
|
||||
@@ -270,7 +264,7 @@ in {
|
||||
./ssh.nix
|
||||
./sshd.nix
|
||||
./sudo.nix
|
||||
./nsxiv.nix
|
||||
./sxiv.nix
|
||||
./themes.nix
|
||||
./tmux.nix
|
||||
./traadfri.nix
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
roboto
|
||||
roboto-mono
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
roboto-slab
|
||||
scheherazade-new
|
||||
@@ -47,7 +46,7 @@
|
||||
fontconfig.defaultFonts = {
|
||||
monospace = ["Noto Sans Mono"];
|
||||
serif = ["Noto Serif" "Noto Naskh Arabic" "Noto Serif Devanagari"];
|
||||
sansSerif = ["Noto Sans Display" "Noto Kufi Arabic" "Noto Sans Devanagari" "Noto Sans CJK JP"];
|
||||
sansSerif = ["Noto Sans Display" "Noto Kufi Arabic" "Noto Sans Devanagari"];
|
||||
emoji = ["Noto Color Emoji" "Noto Emoji"];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -167,7 +167,7 @@ in {
|
||||
text = colours.foreground;
|
||||
};
|
||||
};
|
||||
statusCommand = "env I3RS_GITHUB_TOKEN=${lib.strings.fileContents <secrets/github/notification.token>} ${pkgs.i3status-rust}/bin/i3status-rs ${
|
||||
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${
|
||||
(pkgs.formats.toml {}).generate "i3status-rust.toml" (import <niveum/lib/i3status-rust.nix> {
|
||||
inherit (config.niveum) batteryName wirelessInterface;
|
||||
inherit colours;
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
"application/pdf" = "org.pwmt.zathura.desktop";
|
||||
"application/vnd.oasis.opendocument.text" = "writer.desktop";
|
||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" = "writer.desktop";
|
||||
"image/jpeg" = "nsxiv.desktop";
|
||||
"image/png" = "nsxiv.desktop";
|
||||
"image/jpeg" = "sxiv.desktop";
|
||||
"image/png" = "sxiv.desktop";
|
||||
"image/vnd.djvu+multipage" = "org.pwmt.zathura.desktop";
|
||||
"text/html" = "brave-browser.desktop";
|
||||
"text/markdown" = "nvim.desktop";
|
||||
|
||||
@@ -25,7 +25,7 @@ in {
|
||||
pkgs.writeText "mailcap" ''
|
||||
text/plain; $EDITOR %s ;
|
||||
text/html; ${pkgs.lynx}/bin/lynx -assume_charset=%{charset} -display_charset=utf-8 -dump %s; nametemplate=%s.html; copiousoutput;
|
||||
image/*; ${pkgs.nsxiv}/bin/nsxiv %s ;
|
||||
image/*; ${pkgs.sxiv}/bin/sxiv %s ;
|
||||
video/*; ${pkgs.utillinux}/bin/setsid ${pkgs.mpv}/bin/mpv --quiet %s &; copiousoutput
|
||||
audio/*; ${pkgs.mpv}/bin/mpv %s ;
|
||||
application/pdf; ${pkgs.zathura}/bin/zathura %s ;
|
||||
@@ -115,7 +115,7 @@ in {
|
||||
color index red default '.*'
|
||||
color index_flags lightcyan default '.*'
|
||||
color index_author yellow default '.*'
|
||||
color index_subject default default '.*'
|
||||
color index_subject white default '.*'
|
||||
|
||||
# New mail is boldened:
|
||||
color index_author lightyellow default "~N"
|
||||
|
||||
@@ -75,7 +75,7 @@ in {
|
||||
pkgs.newsboat
|
||||
(pkgs.writers.writeDashBin "newsboat-unread-count" ''
|
||||
if [ -f ${newsboat-home}/cache.db.lock ]; then
|
||||
${pkgs.jq}/bin/jq -n '{state: "Info", text: "↻", icon: "rss"}'
|
||||
${pkgs.jq}/bin/jq -n '{state: "Info", text: "↻", icon: "update"}'
|
||||
else
|
||||
|
||||
${pkgs.jq}/bin/jq -n \
|
||||
|
||||
@@ -7,16 +7,8 @@
|
||||
inherit (import <niveum/lib>) sshPort kieran;
|
||||
externalNetwork = import <niveum/lib/external-network.nix>;
|
||||
sshIdentity = name: "${config.users.users.me.home}/.ssh/${name}";
|
||||
ssh-passphease = lib.strings.fileContents <system-secrets/ssh/passphrase>;
|
||||
in {
|
||||
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
|
||||
'');
|
||||
services.xserver.displayManager.sessionCommands = "${pkgs.openssh}/bin/ssh-add";
|
||||
|
||||
programs.ssh.startAgent = true;
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@
|
||||
cf ''${XDG_CONFIG_HOME:-$HOME/.config}
|
||||
'';
|
||||
in {
|
||||
environment.systemPackages = [pkgs.nsxiv];
|
||||
environment.systemPackages = [pkgs.sxiv];
|
||||
|
||||
# TODO fix
|
||||
home-manager.users.me.xdg.configFile."nsxiv/exec/key-handler".source = pkgs.writers.writeDash "key-handler" ''
|
||||
home-manager.users.me.xdg.configFile."sxiv/exec/key-handler".source = pkgs.writers.writeDash "key-handler" ''
|
||||
PATH=$PATH:${
|
||||
lib.makeBinPath [
|
||||
pkgs.gnused
|
||||
@@ -19,7 +19,6 @@ in {
|
||||
./astrology.nix
|
||||
./autorenkalender.nix
|
||||
./hesychius.nix
|
||||
./smyth.nix
|
||||
./nachtischsatan.nix
|
||||
./tlg-wotd.nix
|
||||
<niveum/modules/telegram-bot.nix>
|
||||
|
||||
@@ -13,8 +13,6 @@ in {
|
||||
command = "${pkgs.coreutils}/bin/shuf -n1 ${hesychius}";
|
||||
};
|
||||
|
||||
systemd.timers.telegram-bot-hesychius.timerConfig.RandomizedDelaySec = "10h";
|
||||
|
||||
niveum.passport.services = [
|
||||
{
|
||||
title = "Hesychius of Alexandria Bot";
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
{
|
||||
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";
|
||||
}
|
||||
];
|
||||
}
|
||||
42
flake.lock
generated
42
flake.lock
generated
@@ -23,11 +23,11 @@
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1661573386,
|
||||
"narHash": "sha256-pBEg8iY00Af/SAtU2dlmOAv+2x7kScaGlFRDjNoVJO8=",
|
||||
"lastModified": 1660574517,
|
||||
"narHash": "sha256-Lp5D2pAPrM3iAc1eeR0iGwz5rM+SYOWzVxI3p17nlrU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "d89bdff445eadff03fe414e9c30486bc8166b72b",
|
||||
"rev": "688e5c85b7537f308b82167c8eb4ecfb70a49861",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -47,15 +47,15 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1661273257,
|
||||
"narHash": "sha256-cywpSH3D291AwdO/ecJxHeN2Vuuz0cIy/NEXMsFT+Og=",
|
||||
"owner": "kmein",
|
||||
"lastModified": 1644957911,
|
||||
"narHash": "sha256-ggie/j7pdBqzDs4W7OiPmhqH9IGbXAbJxGqBdVxA8jA=",
|
||||
"owner": "Mic92",
|
||||
"repo": "krops",
|
||||
"rev": "542bc544ec8b0b807933a812d098e601683b0956",
|
||||
"rev": "86fb3d2ee94fd8306231853b323ed8804edf26ec",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "kmein",
|
||||
"owner": "Mic92",
|
||||
"repo": "krops",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -110,11 +110,11 @@
|
||||
},
|
||||
"nixos-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1661520432,
|
||||
"narHash": "sha256-9z+WDeXiu3hobvSsL0SbHDx4s+kFmm8eussySuX4zCM=",
|
||||
"lastModified": 1660926553,
|
||||
"narHash": "sha256-19Ib1b7Ny+yGhnxwnH1KhhB2hvALuNuqevA6XzqkQmo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "f11e12ac6af528c1ba12426ce83cee26f21ceafd",
|
||||
"rev": "00e376e3f3c22d991052dfeaf154c42b09deeb29",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -126,11 +126,11 @@
|
||||
},
|
||||
"nixos-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1660305968,
|
||||
"narHash": "sha256-r0X1pZCSEA6mzt5OuTA7nHuLmvnbkwgpFAh1iLIx4GU=",
|
||||
"lastModified": 1660908602,
|
||||
"narHash": "sha256-SwZ85IPWvC4NxxFhWhRMTJpApSHbY1u4YK2UFWEBWvY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d",
|
||||
"rev": "495b19d5b3e62b4ec7e846bdfb6ef3d9c3b83492",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -195,11 +195,11 @@
|
||||
"scripts": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1662493500,
|
||||
"narHash": "sha256-EdAEKDQ6z7oinqQ28ELE3+taJ106DgmhNJt/rpqHJic=",
|
||||
"lastModified": 1660677220,
|
||||
"narHash": "sha256-cCmyI4CigWbeQ0wEiE9HSI2Hmd3Wi5P7jhdHX6bJkXU=",
|
||||
"owner": "kmein",
|
||||
"repo": "scripts",
|
||||
"rev": "51c641ac3c1100d80313696663db70c2eb3698dc",
|
||||
"rev": "688e141047e831a7e5f58dd24e00de51a3cb2345",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -211,11 +211,11 @@
|
||||
"stockholm": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1661246925,
|
||||
"narHash": "sha256-hGNCF4m3SuVogqoipmJzNIKoh03S/SMnO5oMHgfHWjA=",
|
||||
"lastModified": 1660682075,
|
||||
"narHash": "sha256-2Q0j7FiYao0VDRKnW1jSLJu3Cn/ORz/pPsyW+wwWoEU=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "d1fa957ed5bf60767c83c96135f9142f6c96ea50",
|
||||
"revCount": 10749,
|
||||
"rev": "9ae4a08ccc07964decc51fb1e92bc35d49e4691c",
|
||||
"revCount": 10732,
|
||||
"type": "git",
|
||||
"url": "https://cgit.lassul.us/stockholm"
|
||||
},
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
inputs.nixpkgs.follows = "nixos-unstable";
|
||||
};
|
||||
krops = {
|
||||
url = "github:kmein/krops";
|
||||
url = "github:Mic92/krops";
|
||||
inputs.nixpkgs.follows = "nixos-stable";
|
||||
inputs.flake-utils.follows = "flake-utils";
|
||||
};
|
||||
@@ -152,7 +152,6 @@
|
||||
toString (krops.packages.${system}.writeDeploy "deploy-${name}" {
|
||||
source = krops.lib.evalSource [(source {inherit sources unstable name;})];
|
||||
target = "${user}@${host}:${toString sshPort}";
|
||||
useNixOutputMonitor = true;
|
||||
});
|
||||
in {
|
||||
apps.${system} = let
|
||||
|
||||
@@ -35,8 +35,6 @@ in {
|
||||
};
|
||||
icons.name = "awesome6";
|
||||
icons.overrides.rss = "";
|
||||
icons.overrides.vpn = "";
|
||||
icons.overrides.irc = "";
|
||||
block = [
|
||||
{
|
||||
block = "weather";
|
||||
@@ -72,11 +70,6 @@ in {
|
||||
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;
|
||||
@@ -93,7 +86,7 @@ in {
|
||||
| (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),
|
||||
text: ($overdue + $dueToday) | tostring,
|
||||
state: (
|
||||
if $overdue > 0 then
|
||||
"Critical"
|
||||
@@ -107,30 +100,27 @@ in {
|
||||
'
|
||||
'';
|
||||
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/$/}/'
|
||||
''} &";
|
||||
query-account = account:
|
||||
pkgs.writers.writeDash "query-imap" ''
|
||||
${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]+'
|
||||
'';
|
||||
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
|
||||
${lib.concatMapStringsSep "\n" query-account (builtins.attrValues accounts)}
|
||||
} | jq -s '
|
||||
(. | add) as $sum
|
||||
| {
|
||||
text: (if $sum > 0 then $sum | tostring else "" end),
|
||||
text: $sum | tostring,
|
||||
icon: "mail",
|
||||
state: (
|
||||
if .uni > 0 or .["work-uni"] > 0 or .posteo > 0 then
|
||||
if $sum > 5 then
|
||||
"Warning"
|
||||
elif $sum > 0 then
|
||||
"Info"
|
||||
@@ -138,35 +128,19 @@ in {
|
||||
"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";
|
||||
interval = 5;
|
||||
command = pkgs.writers.writeDash "hu-berlin-vpn" ''
|
||||
PATH=${lib.makeBinPath [pkgs.systemd]}
|
||||
(systemctl is-active --quiet openvpn-hu-berlin.service && echo '{"state": "Good", "text": "OpenVPN", "icon": "vpn"}') \
|
||||
|| (systemctl is-active --quiet hu-vpn.service && echo '{"state": "Good", "text": "PPP+SSL", "icon": "vpn"}') \
|
||||
|| echo '{"state": "Idle", "icon": "vpn", "text": ""}'
|
||||
(systemctl is-active --quiet openvpn-hu-berlin.service && echo "OVPN") \
|
||||
|| (systemctl is-active --quiet hu-vpn.service && echo "PPP-VPN") \
|
||||
|| :
|
||||
'';
|
||||
json = true;
|
||||
hide_when_empty = true;
|
||||
}
|
||||
{
|
||||
block = "net";
|
||||
@@ -194,7 +168,7 @@ in {
|
||||
{block = "load";}
|
||||
{
|
||||
block = "custom";
|
||||
interval = 1;
|
||||
interval = 10;
|
||||
json = true;
|
||||
command = pkgs.writers.writeDash "time" ''
|
||||
${pkgs.jq}/bin/jq -n \
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
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"
|
||||
}
|
||||
${pkgs.qrencode}/bin/qrencode "$(${pkgs.xclip}/bin/xclip -selection clipboard -out)" -o "$file"
|
||||
${pkgs.nsxiv}/bin/nsxiv "$file"
|
||||
${pkgs.sxiv}/bin/sxiv "$file"
|
||||
'';
|
||||
|
||||
ttspaste = pkgs.writers.writeDashBin "ttspaste" ''
|
||||
@@ -123,7 +123,7 @@ in
|
||||
};
|
||||
|
||||
meteo = wrapScript {
|
||||
packages = [pkgs.jq pkgs.curl pkgs.xdotool pkgs.nsxiv pkgs.gnused];
|
||||
packages = [pkgs.jq pkgs.curl pkgs.xdotool pkgs.sxiv pkgs.gnused];
|
||||
script = ./meteo.sh;
|
||||
name = "meteo";
|
||||
};
|
||||
@@ -433,7 +433,7 @@ in
|
||||
scanned = pkgs.writers.writeDashBin "scanned" ''
|
||||
[ $# -eq 1 -a -f "$1" -a -r "$1" ] || exit 1
|
||||
|
||||
${pkgs.imagemagick}/bin/convert -density 150 "$1" -rotate 0.5 -attenuate 0.25 +noise Multiplicative -colorspace Gray "scanned-$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"
|
||||
'';
|
||||
|
||||
nix-index-update = pkgs.writers.writeDashBin "nix-index-update" ''
|
||||
|
||||
@@ -69,8 +69,8 @@ curl -sSL \
|
||||
"http://wetterstationen.meteomedia.de/messnetz/vorhersagegrafik/$station.png" \
|
||||
-o "$cache"
|
||||
|
||||
if window_id=$(xdotool search --name "^nsxiv - $cache$"); then
|
||||
if window_id=$(xdotool search --name "^sxiv - $cache$"); then
|
||||
xdotool key --window "$window_id" r
|
||||
else
|
||||
nsxiv "$cache" &
|
||||
sxiv "$cache" &
|
||||
fi
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
{
|
||||
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,7 +17,6 @@ in {
|
||||
./monitoring
|
||||
./moodle-dl-borsfaye.nix
|
||||
./names.nix
|
||||
./grimm.nix
|
||||
./nextcloud.nix
|
||||
./radio-news.nix
|
||||
./radio.nix
|
||||
@@ -104,11 +103,5 @@ in {
|
||||
defaults.email = kieran.email;
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.vim
|
||||
pkgs.git
|
||||
pkgs.tmux
|
||||
pkgs.python3
|
||||
pkgs.nix-output-monitor
|
||||
];
|
||||
environment.systemPackages = [pkgs.vim pkgs.git pkgs.tmux pkgs.python3];
|
||||
}
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
{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,10 +114,6 @@
|
||||
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"];
|
||||
}
|
||||
{
|
||||
name = "Ist der Congress schon abgesagt?";
|
||||
url = "https://ist-der-congress-schon-abgesagt.de/";
|
||||
}
|
||||
{
|
||||
name = "fxght.or.flxght";
|
||||
url = "https://api.tellonym.me/profiles/name/fxght.or.flxght?limit=20";
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
}: let
|
||||
inherit (import <niveum/lib>) kieran;
|
||||
relayPassword = lib.fileContents <system-secrets/weechat/relay>;
|
||||
weechatHome = "/var/lib/weechat";
|
||||
in {
|
||||
systemd.services.weechat = let
|
||||
tmux = pkgs.writers.writeDash "tmux" ''
|
||||
@@ -32,7 +31,6 @@ in {
|
||||
pkgs.weechatScripts.weechat-autosort
|
||||
pkgs.weechatScripts.colorize_nicks
|
||||
pkgs.weechatScripts.weechat-matrix
|
||||
(pkgs.callPackage <niveum/packages/weechatScripts/hotlist2extern.nix> {})
|
||||
];
|
||||
settings = let
|
||||
nick = "kmein";
|
||||
@@ -108,13 +106,6 @@ in {
|
||||
};
|
||||
};
|
||||
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 = {
|
||||
address = "nibbana.jp";
|
||||
username = nick;
|
||||
@@ -172,7 +163,7 @@ in {
|
||||
wantedBy = ["multi-user.target"];
|
||||
restartIfChanged = true;
|
||||
path = [pkgs.alacritty.terminfo];
|
||||
environment.WEECHAT_HOME = weechatHome;
|
||||
environment.WEECHAT_HOME = "/var/lib/weechat";
|
||||
preStart = "${pkgs.coreutils}/bin/rm $WEECHAT_HOME/*.conf";
|
||||
script = "${tmux} -2 new-session -d -s IM ${weechat}/bin/weechat";
|
||||
preStop = "${tmux} kill-session -t IM";
|
||||
|
||||
Reference in New Issue
Block a user