about summary refs log tree commit diff
diff options
context:
space:
mode:
authorCasey Link <unnamedrambler@gmail.com>2024-03-28 14:08:49 +0100
committerCasey Link <unnamedrambler@gmail.com>2024-03-28 14:12:12 +0100
commit6955b3743c86b032cb15108ad3b522f40ee4b451 (patch)
tree480a568a67dfe0c5d56059f166dc76c1c8369ffa
parentc3e603e788171c64c4f1a0a7901c860fbcd13f0c (diff)
downloadnixlib-6955b3743c86b032cb15108ad3b522f40ee4b451.tar
nixlib-6955b3743c86b032cb15108ad3b522f40ee4b451.tar.gz
nixlib-6955b3743c86b032cb15108ad3b522f40ee4b451.tar.bz2
nixlib-6955b3743c86b032cb15108ad3b522f40ee4b451.tar.lz
nixlib-6955b3743c86b032cb15108ad3b522f40ee4b451.tar.xz
nixlib-6955b3743c86b032cb15108ad3b522f40ee4b451.tar.zst
nixlib-6955b3743c86b032cb15108ad3b522f40ee4b451.zip
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.
-rw-r--r--nixos/modules/services/audio/roon-server.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/services/audio/roon-server.nix b/nixos/modules/services/audio/roon-server.nix
index 8691c08b0d36..8a6cf6ec6a41 100644
--- a/nixos/modules/services/audio/roon-server.nix
+++ b/nixos/modules/services/audio/roon-server.nix
@@ -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;