diff --git a/nixos/modules/services/audio/mpd.nix b/nixos/modules/services/audio/mpd.nix index 904b0a8c60a4..6f1d5d307a20 100644 --- a/nixos/modules/services/audio/mpd.nix +++ b/nixos/modules/services/audio/mpd.nix @@ -80,6 +80,29 @@ in ''; }; + user = lib.mkOption { + type = lib.types.str; + default = name; + description = "User account under which MPD runs."; + }; + + group = lib.mkOption { + type = lib.types.str; + default = name; + description = "Group account under which MPD runs."; + }; + + dataDir = lib.mkOption { + type = lib.types.path; + default = "/var/lib/${name}"; + description = '' + The directory where MPD stores its state, tag cache, playlists etc. If + left as the default value this directory will automatically be created + before the MPD server starts, otherwise the sysadmin is responsible for + ensuring the directory exists with appropriate ownership and permissions. + ''; + }; + musicDirectory = lib.mkOption { type = with lib.types; either path (strMatching "(http|https|nfs|smb)://.+"); default = "${cfg.dataDir}/music"; @@ -115,29 +138,6 @@ in ''; }; - dataDir = lib.mkOption { - type = lib.types.path; - default = "/var/lib/${name}"; - description = '' - The directory where MPD stores its state, tag cache, playlists etc. If - left as the default value this directory will automatically be created - before the MPD server starts, otherwise the sysadmin is responsible for - ensuring the directory exists with appropriate ownership and permissions. - ''; - }; - - user = lib.mkOption { - type = lib.types.str; - default = name; - description = "User account under which MPD runs."; - }; - - group = lib.mkOption { - type = lib.types.str; - default = name; - description = "Group account under which MPD runs."; - }; - network = { listenAddress = lib.mkOption {