From fce8ebf4d1fd79eb7b9289cd31302b63db0e9228 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Wed, 29 Oct 2025 16:53:16 +0200 Subject: [PATCH] nixos/mpd: move user, group & dataDir upwards (preparation commit) --- nixos/modules/services/audio/mpd.nix | 46 ++++++++++++++-------------- 1 file changed, 23 insertions(+), 23 deletions(-) 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 {