summaryrefslogtreecommitdiffstats
path: root/lass/1systems/yellow/config.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2020-09-16 21:55:09 +0200
committermakefu <github@syntax-fehler.de>2020-09-16 21:55:09 +0200
commitc64fb07027b49a3825b6f0814ebeb17782b8266a (patch)
treee1b4681fd93a4d3257b556dd8d579464d653ef77 /lass/1systems/yellow/config.nix
parent1394ae1bd4bc3dcfb77b0daee996e75f8092fc5b (diff)
parent88a9183d1d36424977b0cd8ed513109433b779b2 (diff)
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'lass/1systems/yellow/config.nix')
-rw-r--r--lass/1systems/yellow/config.nix23
1 files changed, 22 insertions, 1 deletions
diff --git a/lass/1systems/yellow/config.nix b/lass/1systems/yellow/config.nix
index 82fe3fac5..bc3b1f5d5 100644
--- a/lass/1systems/yellow/config.nix
+++ b/lass/1systems/yellow/config.nix
@@ -251,6 +251,27 @@ with import <stockholm/lib>;
3f8a56ddb2e64eb67adfc9b337157ff4
-----END OpenVPN Static key V1-----
</tls-auth>
-
'';
+
+ systemd.services.flix-index = {
+ wantedBy = [ "multi-user.target" ];
+ path = [
+ pkgs.coreutils
+ pkgs.findutils
+ pkgs.inotifyTools
+ ];
+ serviceConfig = {
+ Restart = "always";
+ ExecStart = pkgs.writers.writeDash "flix-index" ''
+ set -efu
+
+ DIR=/var/download/finished
+ cd "$DIR"
+ while inotifywait -rq -e create -e move -e delete "$DIR"; do
+ find . -type f > "$DIR"/index.tmp
+ mv "$DIR"/index.tmp "$DIR"/index
+ done
+ '';
+ };
+ };
}