summaryrefslogtreecommitdiffstats
path: root/makefu
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2020-08-19 21:16:14 +0200
committerlassulus <lassulus@lassul.us>2020-08-19 21:16:14 +0200
commit6538131f91ce9dbedc8efaa6c1d6196ad5b0f3d6 (patch)
tree3ec0ff96e88b2d212e8e3c9566b66b23154fc03d /makefu
parent03939b14e1d5820bee8c43d63b34c6e3e0e5eac4 (diff)
parent1d78ac0d6a78048903cc159b82ec6b405b7e16ab (diff)
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu')
-rw-r--r--makefu/0tests/data/secrets/bureautomation/citadel.nix4
-rw-r--r--makefu/2configs/bureautomation/camera/comic.nix4
-rw-r--r--makefu/2configs/bureautomation/comic-updater.nix12
-rw-r--r--makefu/2configs/bureautomation/default.nix7
-rw-r--r--makefu/2configs/git/cgit-retiolum.nix1
-rw-r--r--makefu/2configs/tools/consoles.nix2
-rw-r--r--makefu/2configs/tools/media.nix1
-rw-r--r--makefu/5pkgs/hactool/default.nix30
-rw-r--r--makefu/5pkgs/nx_game_info/default.nix32
9 files changed, 88 insertions, 5 deletions
diff --git a/makefu/0tests/data/secrets/bureautomation/citadel.nix b/makefu/0tests/data/secrets/bureautomation/citadel.nix
new file mode 100644
index 000000000..b4433109c
--- /dev/null
+++ b/makefu/0tests/data/secrets/bureautomation/citadel.nix
@@ -0,0 +1,4 @@
+{
+ MATRIX_TOKEN="a";
+ MATRIX_ID="b";
+}
diff --git a/makefu/2configs/bureautomation/camera/comic.nix b/makefu/2configs/bureautomation/camera/comic.nix
index a847b0add..a523d032e 100644
--- a/makefu/2configs/bureautomation/camera/comic.nix
+++ b/makefu/2configs/bureautomation/camera/comic.nix
@@ -3,4 +3,8 @@
platform = "generic";
still_image_url = http://127.0.0.1:8123/local/lines.png ;
}
+ { name = "XKCD";
+ platform = "generic";
+ still_image_url = http://127.0.0.1:8123/local/xkcd.png ;
+ }
]
diff --git a/makefu/2configs/bureautomation/comic-updater.nix b/makefu/2configs/bureautomation/comic-updater.nix
index 5f26bc2c7..1e2440939 100644
--- a/makefu/2configs/bureautomation/comic-updater.nix
+++ b/makefu/2configs/bureautomation/comic-updater.nix
@@ -6,21 +6,29 @@ let
in {
systemd.services.comic-updater = {
startAt = "daily";
- description = "Send led change to message queue";
+ description = "update our comics";
after = [ "network-online.target" ] ++ (lib.optional config.services.mosquitto.enable "mosquitto.service");
path = with pkgs; [ wget xmlstarlet ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
User = "hass";
WorkingDirectory = config.services.home-assistant.configDir;
- ExecStart = pkgs.writeDash "update-poorly-drawn-lines" ''
+ ExecStart = pkgs.writeDash "update-comics" ''
set -euf
mkdir -p www/
cd www/
+ # poorly drawn lines
pic=$(wget -O- http://www.poorlydrawnlines.com/feed/ \
| xml sel -t -v '/rss/channel/item/content:encoded' \
| head -n 2 | sed -n 's/.*src="\([^"]\+\)".*/\1/p' )
wget "$pic" -nc && cp -v "$(basename "$pic")" lines.png
+
+ #pic=$(curl -L xkcd.com 2>/dev/null | grep imgs.xkcd.com | grep title | sed -n 's/.*src="\([^"]\+\)" .*/https:\1/p')
+ # xkcd
+ pic=$(wget -O- https://xkcd.com/rss.xml \
+ | xml sel -t -v '/rss/channel/item/description' \
+ | head -n 1 | sed -n 's/.*src="\([^"]\+\)".*/\1/p' )
+ wget "$pic" -nc && cp -v "$(basename "$pic")" xkcd.png
'';
PrivateTmp = true;
};
diff --git a/makefu/2configs/bureautomation/default.nix b/makefu/2configs/bureautomation/default.nix
index c115bcb6c..9b33595f4 100644
--- a/makefu/2configs/bureautomation/default.nix
+++ b/makefu/2configs/bureautomation/default.nix
@@ -137,9 +137,9 @@ in {
++ frosch.binary_sensor
++ aramark.binary_sensor;
- sensor =
- # [{ platform = "version"; }] ++ # pyhaversion
- (import ./sensor/pollen.nix)
+ sensor = []
+ ++ [{ platform = "version"; }] # pyhaversion
+ ++ (import ./sensor/pollen.nix)
++ (import ./sensor/espeasy.nix)
++ (import ./sensor/airquality.nix)
++ ((import ./sensor/outside.nix) {inherit lib;})
@@ -238,6 +238,7 @@ in {
"camera.Autobahn_Singen"
"camera.puppies"
"camera.poorly_drawn_lines"
+ "camera.xkcd"
];
nachtlicht = [
"switch.nachtlicht_a"
diff --git a/makefu/2configs/git/cgit-retiolum.nix b/makefu/2configs/git/cgit-retiolum.nix
index 639994674..3e3ef09a8 100644
--- a/makefu/2configs/git/cgit-retiolum.nix
+++ b/makefu/2configs/git/cgit-retiolum.nix
@@ -19,6 +19,7 @@ let
cgit.desc = "Yet Another Check-Out System";
};
ebk-notify.cgit.desc = "Ebay Kleinanzeigen Notify";
+ kalauerbot.cgit.desc = "Kalauer König";
};
krebs-repos = mapAttrs make-krebs-repo {
diff --git a/makefu/2configs/tools/consoles.nix b/makefu/2configs/tools/consoles.nix
index 7090804d4..e54ff4ff5 100644
--- a/makefu/2configs/tools/consoles.nix
+++ b/makefu/2configs/tools/consoles.nix
@@ -5,5 +5,7 @@
hdl-dump
bin2iso
cue2pops
+ nx_game_info
+ hactool
];
}
diff --git a/makefu/2configs/tools/media.nix b/makefu/2configs/tools/media.nix
index 21d302297..d66ea7760 100644
--- a/makefu/2configs/tools/media.nix
+++ b/makefu/2configs/tools/media.nix
@@ -7,6 +7,7 @@
vlc
mumble
mplayer
+ mpv
# quodlibet # exfalso
tinymediamanager
diff --git a/makefu/5pkgs/hactool/default.nix b/makefu/5pkgs/hactool/default.nix
new file mode 100644
index 000000000..0bdaeb4be
--- /dev/null
+++ b/makefu/5pkgs/hactool/default.nix
@@ -0,0 +1,30 @@
+{ lib, stdenv, fetchFromGitHub
+}:
+stdenv.mkDerivation rec {
+ pname = "hactool";
+ name = "${pname}-${version}";
+ version = "1.4.0";
+
+ src = fetchFromGitHub {
+ owner = "SciresM";
+ repo = "hactool";
+ rev = version;
+ sha256 = "0305ngsnwm8npzgyhyifasi4l802xnfz19r0kbzzniirmcn4082d";
+ };
+ preBuild = ''
+ cp config.mk.template config.mk
+ '';
+ installPhase = ''
+ install -D hactool $out/bin/hactool
+ '';
+ buildInputs = [ ];
+ nativeBuildInputs = [ ];
+
+ meta = {
+ description = "tool to view information about, decrypt, and extract common file formats for the Nintendo Switch, especially Nintendo Content Archives";
+ homepage = https://github.com/SciresM/hactool;
+ license = stdenv.lib.licenses.isc;
+ platforms = stdenv.lib.platforms.linux;
+ maintainers = with stdenv.lib.maintainers; [ makefu ];
+ };
+}
diff --git a/makefu/5pkgs/nx_game_info/default.nix b/makefu/5pkgs/nx_game_info/default.nix
new file mode 100644
index 000000000..89880d59c
--- /dev/null
+++ b/makefu/5pkgs/nx_game_info/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl , mono , unzip
+}:
+stdenv.mkDerivation rec {
+ pname = "NX_Game_Info";
+ name = "${pname}-${version}";
+ version = "0.7.1";
+
+ src = fetchurl {
+ url = "https://github.com/garoxas/NX_Game_Info/releases/download/v${version}/NX.Game.Info_${version}_cli.zip";
+ sha256 = "179hkgraydm5hg5fcs1xwh07cx7rbcfwklfak83f0sl1pbya542h";
+ };
+
+ sourceRoot = ".";
+ buildInputs = [ unzip ];
+ buildPhase = ":";
+ installPhase = ''
+ mkdir -p $out/{bin,lib}
+ cp * $out/lib/
+ cat > $out/bin/nxgameinfo_cli <<EOF
+ ${mono}/bin/mono $out/lib/nxgameinfo_cli.exe "\$@"
+ EOF
+ chmod +x $out/bin/nxgameinfo_cli
+ '';
+
+ meta = {
+ description = "Tool to read information from Nintendo Switch game files";
+ homepage = https://github.com/garoxas/NX_Game_Info;
+ license = stdenv.lib.licenses.gpl3;
+ platforms = stdenv.lib.platforms.linux;
+ maintainers = with stdenv.lib.maintainers; [ makefu ];
+ };
+}