l neoprism.r: host radio.r container
This commit is contained in:
parent
b0b89a392b
commit
917889f8fc
|
@ -4,8 +4,13 @@
|
|||
imports = [
|
||||
<stockholm/lass>
|
||||
<stockholm/lass/2configs/retiolum.nix>
|
||||
|
||||
# sync-containers
|
||||
<stockholm/lass/2configs/consul.nix>
|
||||
<stockholm/lass/2configs/yellow-host.nix>
|
||||
<stockholm/lass/2configs/radio/container-host.nix>
|
||||
|
||||
# other containers
|
||||
<stockholm/lass/2configs/riot.nix>
|
||||
];
|
||||
|
||||
|
|
23
lass/2configs/radio/container-host.nix
Normal file
23
lass/2configs/radio/container-host.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
lass.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'
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue