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

fix(radio): clean up files after 1h

This commit is contained in:
2022-02-10 19:28:28 +01:00
parent db8c06364f
commit 87f73a8fc1

View File

@@ -1,5 +1,7 @@
{ lib, pkgs, config, ... }:
let
inherit (import <niveum/lib>) tmpfilesConfig;
liquidsoapDirectory = "/var/cache/liquidsoap";
icecastPassword = "hackme";
lyrikline-poem = pkgs.writers.writeDash "lyrikline.sh" ''
set -efu
@@ -44,7 +46,7 @@ let
'';
wikipedia-article = pkgs.writers.writeDash "wikipedia.sh" ''
set -efu
opus=$(mktemp /tmp/wikipedia.XXX.opus)
opus=$(mktemp ${liquidsoapDirectory}/wikipedia.XXX.opus)
html=$(mktemp)
trap clean EXIT
@@ -103,6 +105,20 @@ in {
)
'';
systemd.services.radio.environment.TMPDIR = liquidsoapDirectory;
systemd.tmpfiles.rules = [
(tmpfilesConfig {
type = "d";
path = liquidsoapDirectory;
mode = "0750";
user = "liquidsoap";
group = "liquidsoap";
age = "1h";
})
];
services.icecast = {
enable = true;
hostname = "radio.kmein.de";