From 38540f8b729d39b5daa7548d5423cac5ac7a0913 Mon Sep 17 00:00:00 2001 From: Markus Schmidl Date: Sat, 13 Apr 2019 18:24:44 +0200 Subject: [PATCH] added mpd-index container --- hosts/containers/mpd-index/configuration.nix | 45 ++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 hosts/containers/mpd-index/configuration.nix diff --git a/hosts/containers/mpd-index/configuration.nix b/hosts/containers/mpd-index/configuration.nix new file mode 100644 index 00000000..c4acc387 --- /dev/null +++ b/hosts/containers/mpd-index/configuration.nix @@ -0,0 +1,45 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, pkgs, lib, ... }: + +{ + imports = + [ ../../../lib/lxc-container.nix + ../../../lib/shared.nix + ../../../lib/admins.nix + ]; + + fileSystems."/mnt/music" = { fsType = "nfs"; device = "172.22.99.10:/mnt/zroot/storage/rpool/Music"; }; + + networking.hostName = "mpd-index"; + + services.mpd = { + enable = true; + user = "mpd"; + group = "audio"; + network = { + listenAddress = "any"; + port = 6600; + }; + musicDirectory = "/mnt/music"; + extraConfig = '' + default_permissions "read,add,control,admin" + + input { + plugin "curl" + } + + audio_output { + type "null" + name "My Null Output" + } + + filesystem_charset "UTF-8" + ''; + }; + + system.stateVersion = "18.09"; # Did you read the comment? + +}