diff options
author | makefu <github@syntax-fehler.de> | 2023-03-08 19:27:59 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2023-03-08 19:27:59 +0100 |
commit | caa8f83e79f7373bf234874b8614117c3f7a0710 (patch) | |
tree | 9167f06d093d44a662536aa4b5e3d32c271ccca0 /lass/2configs/services/radio/container-host.nix | |
parent | 8b4c488bff6b61e2e3ed7c75d96b161a66f5a8c4 (diff) | |
parent | 2168f3961298b661fd010add7972a86af77f81de (diff) |
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'lass/2configs/services/radio/container-host.nix')
-rw-r--r-- | lass/2configs/services/radio/container-host.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lass/2configs/services/radio/container-host.nix b/lass/2configs/services/radio/container-host.nix new file mode 100644 index 000000000..de0ea9afe --- /dev/null +++ b/lass/2configs/services/radio/container-host.nix @@ -0,0 +1,23 @@ +{ config, pkgs, ... }: +{ + krebs.sync-containers3.containers.radio = { + sshKey = "${toString <secrets>}/radio.sync.key"; + }; + containers.radio = { + bindMounts."/var/music" = { + hostPath = "/var/music"; + isReadOnly = false; + }; + }; + krebs.iptables.tables.filter.INPUT.rules = [ + { predicate = "-p tcp --dport 8000"; target = "ACCEPT"; } + ]; + krebs.htgen.radio-redirect = { + port = 8000; + scriptFile = pkgs.writers.writeDash "redir" '' + printf 'HTTP/1.1 301 Moved Permanently\r\n' + printf "Location: http://radio.lassul.us''${Request_URI}\r\n" + printf '\r\n' + ''; + }; +} |