diff --git a/nixos/viridian/configuration.nix b/nixos/viridian/configuration.nix index ddac77c..9cdef40 100644 --- a/nixos/viridian/configuration.nix +++ b/nixos/viridian/configuration.nix @@ -36,6 +36,7 @@ 80 # traefik (HTTP) 443 # traefik (HTTPS) 32372 # qbittorrent + 6600 # mpd ]; allowedUDPPorts = [ 53 # adguardhome (DNS) @@ -43,6 +44,7 @@ 443 # traefik (HTTPS) 32372 # qbittorrent 51820 # Wireguard + 6600 # mpd ]; }; }; diff --git a/nixos/viridian/services/default.nix b/nixos/viridian/services/default.nix index e8f647d..ecf5be3 100644 --- a/nixos/viridian/services/default.nix +++ b/nixos/viridian/services/default.nix @@ -4,5 +4,6 @@ imports = [ ./traefik ./borgbackup.nix + ./mpd.nix ]; } diff --git a/nixos/viridian/services/mpd.nix b/nixos/viridian/services/mpd.nix new file mode 100644 index 0000000..55ebd23 --- /dev/null +++ b/nixos/viridian/services/mpd.nix @@ -0,0 +1,29 @@ +{ ... }: + +{ + services.mpd = { + enable = true; + musicDirectory = "/srv/multimedia/library/music"; + network = { + listenAddress = "any"; + port = 6600; + }; + extraConfig = '' + audio_output { + type "null" + name "This server does not need to play music." + } + ''; + }; + + services.nfs.server = { + enable = true; + lockdPort = 4001; + mountdPort = 4002; + statdPort = 4000; + extraNfsdConfig = ''''; + exports = '' + /srv/multimedia/library/music 192.168.1.101(rw,nohide,insecure,no_subtree_check) + ''; + }; +}