1
0
mirror of https://github.com/kmein/niveum synced 2026-03-21 12:21:08 +01:00

5 Commits

7 changed files with 23 additions and 29 deletions

View File

@@ -1,9 +1,9 @@
{
"url": "https://cgit.krebsco.de/stockholm",
"rev": "9a855d50a7619192b909e8e3657acb16ecbd5fb4",
"date": "2021-10-05T23:18:09+02:00",
"path": "/nix/store/kzcxvmapy6whl25895dq35s11imv8ibi-stockholm",
"sha256": "08c2qd83704c6f3b7m5wxkf5id46bljm6xpkpc42i7svlbakb8zz",
"rev": "be5f4833fe1dc3ec4acb24eeb5a6670c2aaef2e0",
"date": "2021-10-12T22:11:08+02:00",
"path": "/nix/store/cir2mah9pjahvy2mql663zhj6pwzi6h6-stockholm",
"sha256": "1cyl21rh7dlpar33gq2bv0rm8x3s0k3vib75gpgz3qcah0ycdcjw",
"fetchSubmodules": false,
"deepClone": false,
"leaveDotGit": false

View File

@@ -30,13 +30,10 @@ in {
};
};
overlays = [
(import <stockholm/krebs/5pkgs>)
(self: super: {
scripts = import <niveum/packages/scripts> { pkgs = super; lib = super.lib; };
})
(import <stockholm/krebs/5pkgs/haskell>)
(import <stockholm/krebs/5pkgs/simple>)
(import <stockholm/submodules/nix-writers/pkgs>)
(import <stockholm/krebs/5pkgs/override>)
];
};
}

View File

@@ -55,7 +55,7 @@ in {
};
environment.systemPackages = [
(pkgs.writeDashBin "mpv-simpsons" ''
(pkgs.writers.writeDashBin "mpv-simpsons" ''
set -efu
cd "${flixLocation}/download"
[ -f "${cacheLocation}/${indexFilename}" ] || exit 1
@@ -65,7 +65,7 @@ in {
| shuf \
| ${pkgs.findutils}/bin/xargs -d '\n' ${pkgs.mpv}/bin/mpv
'')
(pkgs.writeDashBin "flixmenu" ''
(pkgs.writers.writeDashBin "flixmenu" ''
set -efu
cd "${flixLocation}/download"

View File

@@ -57,6 +57,7 @@ in
107281 # NLP
108736 # Grammatiktheorie
109438 # Warum klingt Orkisch böse
108025 # Poetik der Nordgermanen
];
download_submissions = true;
download_descriptions = true;

View File

@@ -2,6 +2,8 @@
let
hc = pkgs.callPackage <stockholm/tv/5pkgs/simple/hc.nix> {};
worldradio = pkgs.callPackage <niveum/packages/worldradio.nix> {};
menstruation = pkgs.callPackage <niveum/submodules/menstruation-backend> {};
nixpkgs-unstable = import <nixpkgs-unstable> { config.allowUnfree = true; };
recht = pkgs.callPackage (pkgs.fetchFromGitHub {
@@ -169,6 +171,8 @@ in {
qrencode
wtf
menstruation
(pkgs.writers.writeDashBin "worldradio" ''
shuf ${worldradio} | ${pkgs.findutils}/bin/xargs ${pkgs.mpv}/bin/mpv --no-video
'')
@@ -194,6 +198,7 @@ in {
kpaste
irc-announce
git-preview
ircaids
];
}

View File

@@ -131,11 +131,6 @@ in {
device = wirelessInterface;
format = "{ssid} {signal_strength}";
}
{
block = "custom";
interval = 5;
command = ''printf " %s\n" "$(${pkgs.xkblayout-state}/bin/xkblayout-state print %s)"'';
}
{
block = "battery";
device = batteryName;

View File

@@ -2,21 +2,15 @@
let
inherit (pkgs) lib;
irc = {
host = "irc.hackint.org";
port = 6697;
tls = true;
channel = "#the_playlist";
nick = "musikkritiker";
};
playlistAPI = "prism.r:8001";
sendIRC = pkgs.writers.writeDash "send-irc" ''
${pkgs.nur.repos.mic92.untilport}/bin/untilport ${irc.host} ${toString irc.port} && \
${pkgs.nur.repos.mic92.irc-announce}/bin/irc-announce \
${irc.host} ${toString irc.port} ${irc.nick} ${lib.escapeShellArg irc.channel} ${toString (if irc.tls then 1 else 0)} \
"$*" 2>&1 >/dev/null
${pkgs.ircaids}/bin/ircsink \
--nick musikkritiker \
--server irc.hackint.org \
--port 6697 \
--secure \
--target '#the_playlist' >/dev/null 2>&1
'';
messages.good = [
@@ -31,6 +25,7 @@ let
"that just sounds awesome!"
"that's a good song!"
"👍"
"vibin'"
];
messages.bad = [
"how can anyone listen to this?"
@@ -41,16 +36,17 @@ let
"nope"
"that sucks!"
"👎"
"turn that down"
];
in
pkgs.writers.writeDashBin "pls" ''
case "$1" in
good|like|cool|nice|noice|top|yup|yass|yes|+)
${sendIRC} "$(echo ${lib.escapeShellArg (lib.concatStringsSep "\n" messages.good)} | shuf -n1)" &
echo ${lib.escapeShellArg (lib.concatStringsSep "\n" messages.good)} | shuf -n1 | ${sendIRC}
${pkgs.curl}/bin/curl -sS -XPOST "${playlistAPI}/good"
;;
skip|next|bad|sucks|no|nope|flop|-)
${sendIRC} "$(echo ${lib.escapeShellArg (lib.concatStringsSep "\n" messages.bad)} | shuf -n1)" &
echo ${lib.escapeShellArg (lib.concatStringsSep "\n" messages.bad)} | shuf -n1 | ${sendIRC}
${pkgs.curl}/bin/curl -sS -XPOST "${playlistAPI}/skip"
;;
*)