diff --git a/nixos/doc/manual/release-notes/rl-2405.section.md b/nixos/doc/manual/release-notes/rl-2405.section.md index 918a45ac3f7d..a5e59c4ab42f 100644 --- a/nixos/doc/manual/release-notes/rl-2405.section.md +++ b/nixos/doc/manual/release-notes/rl-2405.section.md @@ -287,6 +287,8 @@ The pre-existing [services.ankisyncd](#opt-services.ankisyncd.enable) has been m release notes of [v19](https://github.com/systemd/mkosi/releases/tag/v19) and [v20](https://github.com/systemd/mkosi/releases/tag/v20) for a list of changes. +- `gonic` has been updated to v0.16.4. Config now requires `playlists-path` to be set. See the rest of the [v0.16.0 release notes](https://github.com/sentriz/gonic/releases/tag/v0.16.0) for more details. + - The `services.vikunja` systemd service now uses `vikunja` as dynamic user instead of `vikunja-api`. Database users might need to be changed. - The `services.vikunja.setupNginx` setting has been removed. Users now need to setup the webserver configuration on their own with a proxy pass to the vikunja service. diff --git a/nixos/modules/services/audio/gonic.nix b/nixos/modules/services/audio/gonic.nix index 3dfa24b7fc68..15a35571acba 100644 --- a/nixos/modules/services/audio/gonic.nix +++ b/nixos/modules/services/audio/gonic.nix @@ -55,6 +55,9 @@ in RuntimeDirectory = "gonic"; RootDirectory = "/run/gonic"; ReadWritePaths = ""; + BindPaths = [ + cfg.settings.playlists-path + ]; BindReadOnlyPaths = [ # gonic can access scrobbling services "-/etc/resolv.conf" diff --git a/nixos/tests/gonic.nix b/nixos/tests/gonic.nix index 726d7da0970f..adf0f511a9cf 100644 --- a/nixos/tests/gonic.nix +++ b/nixos/tests/gonic.nix @@ -2,11 +2,19 @@ import ./make-test-python.nix ({ pkgs, ... }: { name = "gonic"; nodes.machine = { ... }: { + systemd.tmpfiles.settings = { + "10-gonic" = { + "/tmp/music"."d" = {}; + "/tmp/podcast"."d" = {}; + "/tmp/playlists"."d" = {}; + }; + }; services.gonic = { enable = true; settings = { - music-path = [ "/tmp" ]; - podcast-path = "/tmp"; + music-path = [ "/tmp/music" ]; + podcast-path = "/tmp/podcast"; + playlists-path = "/tmp/playlists"; }; }; }; diff --git a/pkgs/servers/gonic/default.nix b/pkgs/servers/gonic/default.nix index ee5bfef3b9af..f3c83a164bce 100644 --- a/pkgs/servers/gonic/default.nix +++ b/pkgs/servers/gonic/default.nix @@ -13,17 +13,17 @@ buildGoModule rec { pname = "gonic"; - version = "0.15.2"; + version = "0.16.4"; src = fetchFromGitHub { owner = "sentriz"; repo = pname; rev = "v${version}"; - sha256 = "sha256-lyKKD6Rxr4psFUxqGTtqQ3M/vQXoNPbcg0cTam9MkXk="; + sha256 = "sha256-+8rKODoADU2k1quKvbijjs/6S/hpkegHhG7Si0LSE0k="; }; nativeBuildInputs = [ pkg-config ]; buildInputs = [ taglib zlib ]; - vendorHash = "sha256-+PUKPqW+ER7mmZXrDIc0cE4opoTxA3po3WXSeZO+Xwo="; + vendorHash = "sha256-6JkaiaAgtXYAZqVSRZJFObZvhEsHsbPaO9pwmKqIhYI="; # TODO(Profpatsch): write a test for transcoding support, # since it is prone to break @@ -39,6 +39,11 @@ buildGoModule rec { --replace \ '"mpv"' \ '"${lib.getBin mpv}/bin/mpv"' + '' + '' + substituteInPlace server/ctrlsubsonic/testdata/test* \ + --replace \ + '"audio/flac"' \ + '"audio/x-flac"' ''; passthru = { @@ -49,7 +54,7 @@ buildGoModule rec { homepage = "https://github.com/sentriz/gonic"; description = "Music streaming server / subsonic server API implementation"; license = lib.licenses.gpl3Plus; - maintainers = with lib.maintainers; [ ]; + maintainers = with lib.maintainers; [ autrimpo ]; platforms = lib.platforms.linux; mainProgram = "gonic"; };