mpd/curacao: Can be controlled remotely

This commit is contained in:
Geoffrey Frogeye 2024-03-29 10:42:25 +01:00
parent 0c59a713da
commit 1615abd814
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
3 changed files with 12 additions and 2 deletions

View file

@ -10,6 +10,7 @@
./disko.nix
./features.nix
./hardware.nix
./homeautomation
./webcam
];
}

View file

@ -0,0 +1,10 @@
{ pkgs, lib, config, ... }:
{
config = {
# Allow mpd control from home assistant and phone
networking.firewall.extraCommands = ''
iptables -A nixos-fw -p tcp -m tcp --dport 6600 -s 192.168.7.53 -j nixos-fw-accept
iptables -A nixos-fw -p tcp -m tcp --dport 6600 -s 192.168.7.92 -j nixos-fw-accept
'';
};
}

View file

@ -14,8 +14,7 @@
services.mpd = {
enable = true;
network = {
listenAddress = "0.0.0.0"; # So it can be controlled from home
# TODO ... and whoever is the Wi-Fi network I'm using, which, not great
listenAddress = "0.0.0.0"; # Can be controlled remotely, determined with firewall
startWhenNeeded = true;
};
extraConfig = ''