From 02d0eb6a45bd28b07377ff25eb6131a5ebcd724f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Koutensk=C3=BD?= Date: Tue, 19 Mar 2024 22:09:45 +0100 Subject: [PATCH 1/5] gonic: 0.15.2 -> 0.16.4 --- pkgs/servers/gonic/default.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pkgs/servers/gonic/default.nix b/pkgs/servers/gonic/default.nix index ee5bfef3b9af..2141dd775b2f 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 = { From 0e78517af1ba8b45575725515127c94d257f81fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Koutensk=C3=BD?= Date: Thu, 28 Mar 2024 14:27:51 +0100 Subject: [PATCH 2/5] gonic: add myself as maintainer --- pkgs/servers/gonic/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/servers/gonic/default.nix b/pkgs/servers/gonic/default.nix index 2141dd775b2f..f3c83a164bce 100644 --- a/pkgs/servers/gonic/default.nix +++ b/pkgs/servers/gonic/default.nix @@ -54,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"; }; From 759812cc34ee9cf74757b23c5c8d3648d38cbf32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Koutensk=C3=BD?= Date: Thu, 28 Mar 2024 14:44:34 +0100 Subject: [PATCH 3/5] nixos/gonic: allow access to playlists --- nixos/modules/services/audio/gonic.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nixos/modules/services/audio/gonic.nix b/nixos/modules/services/audio/gonic.nix index 66daeb60b503..b6eb0d365719 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" From f7c740853dccdc0ab120182503c8d2710a658f8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Koutensk=C3=BD?= Date: Thu, 28 Mar 2024 14:45:02 +0100 Subject: [PATCH 4/5] nixosTests.gonic: set up all necessary paths using tmpfiles --- nixos/tests/gonic.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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"; }; }; }; From ef95bc2eaf38e020efb8961ef60a95be2469cc35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Koutensk=C3=BD?= Date: Thu, 28 Mar 2024 14:54:25 +0100 Subject: [PATCH 5/5] gonic: add release note warning about playlists-path --- nixos/doc/manual/release-notes/rl-2405.section.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/doc/manual/release-notes/rl-2405.section.md b/nixos/doc/manual/release-notes/rl-2405.section.md index fea452375477..d89ac501dae5 100644 --- a/nixos/doc/manual/release-notes/rl-2405.section.md +++ b/nixos/doc/manual/release-notes/rl-2405.section.md @@ -215,6 +215,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.