nixos/roon-server: add package option

Upstream updates roon-server frequently, and client apps (iOS, Android,
etc) will stop working with older versions of the roon-server.

We can't always keep the roon-server up to date as fast as upstream
releases, so it is often necessary for users to use an overlay or
provide their own version.

In particular the use case of running NixOS stable channel, but wanting
to use the `pkgs.roon-server` from unstable is one that I want to
support with this simple change.
This commit is contained in:
Casey Link
2024-03-28 14:08:49 +01:00
parent c3e603e788
commit 6955b3743c

View File

@@ -9,6 +9,7 @@ in {
options = {
services.roon-server = {
enable = mkEnableOption (lib.mdDoc "Roon Server");
package = lib.mkPackageOption pkgs "roon-server" { };
openFirewall = mkOption {
type = types.bool;
default = false;
@@ -43,7 +44,7 @@ in {
environment.ROON_ID_DIR = "/var/lib/${name}";
serviceConfig = {
ExecStart = "${pkgs.roon-server}/bin/RoonServer";
ExecStart = "${lib.getExe cfg.package}";
LimitNOFILE = 8192;
User = cfg.user;
Group = cfg.group;