Loading nixos/modules/services/audio/mopidy.nix +15 −8 Original line number Diff line number Diff line Loading @@ -4,12 +4,14 @@ pkgs, ... }: let uid = config.ids.uids.mopidy; gid = config.ids.gids.mopidy; cfg = config.services.mopidy; settingsFormat = pkgs.formats.ini { }; mopidyConf = pkgs.writeText "mopidy.conf" cfg.configuration; mopidyConf = settingsFormat.generate "mopidy.conf" cfg.settings; mopidyEnv = pkgs.buildEnv { name = "mopidy-with-extensions-${pkgs.mopidy.version}"; Loading @@ -24,11 +26,14 @@ let }; in { imports = [ (lib.mkRemovedOptionModule [ "services" "mopidy" "configuration" ] '' Use RFC42-style services.mopidy.settings instead. '') ]; options = { services.mopidy = { enable = lib.mkEnableOption "Mopidy, a music player daemon"; dataDir = lib.mkOption { Loading @@ -48,11 +53,15 @@ in ''; }; configuration = lib.mkOption { default = ""; type = lib.types.lines; settings = lib.mkOption { inherit (settingsFormat) type; example.mpd = { enabled = true; hostname = "::"; }; description = '' The configuration that Mopidy should use. See the upstream documentation <https://docs.mopidy.com/stable/config/> for details. ''; }; Loading @@ -67,8 +76,6 @@ in }; }; ###### implementation config = lib.mkIf cfg.enable { systemd.tmpfiles.settings."10-mopidy".${cfg.dataDir}.d = { Loading Loading
nixos/modules/services/audio/mopidy.nix +15 −8 Original line number Diff line number Diff line Loading @@ -4,12 +4,14 @@ pkgs, ... }: let uid = config.ids.uids.mopidy; gid = config.ids.gids.mopidy; cfg = config.services.mopidy; settingsFormat = pkgs.formats.ini { }; mopidyConf = pkgs.writeText "mopidy.conf" cfg.configuration; mopidyConf = settingsFormat.generate "mopidy.conf" cfg.settings; mopidyEnv = pkgs.buildEnv { name = "mopidy-with-extensions-${pkgs.mopidy.version}"; Loading @@ -24,11 +26,14 @@ let }; in { imports = [ (lib.mkRemovedOptionModule [ "services" "mopidy" "configuration" ] '' Use RFC42-style services.mopidy.settings instead. '') ]; options = { services.mopidy = { enable = lib.mkEnableOption "Mopidy, a music player daemon"; dataDir = lib.mkOption { Loading @@ -48,11 +53,15 @@ in ''; }; configuration = lib.mkOption { default = ""; type = lib.types.lines; settings = lib.mkOption { inherit (settingsFormat) type; example.mpd = { enabled = true; hostname = "::"; }; description = '' The configuration that Mopidy should use. See the upstream documentation <https://docs.mopidy.com/stable/config/> for details. ''; }; Loading @@ -67,8 +76,6 @@ in }; }; ###### implementation config = lib.mkIf cfg.enable { systemd.tmpfiles.settings."10-mopidy".${cfg.dataDir}.d = { Loading