configurations of hq services
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mpd.nix 537B

12345678910111213141516171819202122232425262728
  1. { config, pkgs, lib, ... }:
  2. let
  3. hostMpd = if config.networking.hostName == "storage-ng" then
  4. {
  5. musicDirectory = "/mnt/cephfs/c3d2/rpool/Music";
  6. }
  7. else
  8. {
  9. dbFile = null;
  10. musicDirectory = "/mnt/storage/Music";
  11. extraConfig = ''
  12. database {
  13. plugin "proxy"
  14. host "172.22.99.20"
  15. }
  16. '';
  17. };
  18. in
  19. {
  20. services.mpd = (hostMpd // {
  21. enable=true;
  22. network.listenAddress = "any";
  23. });
  24. networking.firewall.allowedTCPPorts =
  25. [ config.mpd.network.port ];
  26. }