wolf.r: add mobile mpd web frontends
This commit is contained in:
parent
bf1747adb4
commit
481376c150
@ -25,6 +25,7 @@ in
|
||||
<stockholm/krebs/2configs/shack/muell_caller.nix>
|
||||
<stockholm/krebs/2configs/shack/radioactive.nix>
|
||||
<stockholm/krebs/2configs/shack/share.nix>
|
||||
<stockholm/krebs/2configs/shack/mobile.mpd.nix>
|
||||
{
|
||||
systemd.services.telegraf.path = [ pkgs.net_snmp ]; # for snmptranslate
|
||||
systemd.services.telegraf.environment = {
|
||||
@ -114,7 +115,7 @@ in
|
||||
networking = {
|
||||
firewall.enable = false;
|
||||
firewall.allowedTCPPorts = [ 8088 8086 8083 ];
|
||||
interfaces."${ext-if}".ip4 = [{
|
||||
interfaces."${ext-if}".ipv4.addresses = [{
|
||||
address = shack-ip;
|
||||
prefixLength = 20;
|
||||
}];
|
||||
|
32
krebs/2configs/shack/mobile.mpd.nix
Normal file
32
krebs/2configs/shack/mobile.mpd.nix
Normal file
@ -0,0 +1,32 @@
|
||||
{lib,pkgs, ... }:
|
||||
let
|
||||
mpdHost = "mpd.shack";
|
||||
ympd = name: port: let
|
||||
webPort = 10000 + port;
|
||||
in {
|
||||
systemd.services."ympd-${name}" = {
|
||||
description = "mpd for ${name}";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig.ExecStart = "${pkgs.ympd}/bin/ympd --host ${mpdHost} --port ${toString port} --webport ${toString webPort} --user nobody";
|
||||
};
|
||||
services.nginx.virtualHosts."mobile.${name}.mpd.shack" = {
|
||||
serverAliases = [
|
||||
"${name}.mpd.wolf.r"
|
||||
"${name}.mpd.wolf.shack"
|
||||
];
|
||||
locations."/".proxyPass = "http://localhost:${toString webPort}";
|
||||
};
|
||||
};
|
||||
in lib.mkMerge [{
|
||||
services.nginx.enable = true;
|
||||
}
|
||||
(ympd "lounge" 6600)
|
||||
(ympd "seminarraum" 6601)
|
||||
(ympd "elab" 6602)
|
||||
(ympd "kueche" 6603)
|
||||
(ympd "crafting" 6604)
|
||||
(ympd "fablab" 6605)
|
||||
(ympd "workshop" 6606)
|
||||
(ympd "klo" 6607)
|
||||
|
||||
]
|
Loading…
Reference in New Issue
Block a user