nixos/navidrome: add package option

This commit is contained in:
Gabriel Fontes 2023-04-30 22:45:55 -03:00
parent d9ad436f9a
commit 1c3c2c8203
No known key found for this signature in database
GPG key ID: 2E54EA7BFE630916

View file

@ -11,6 +11,8 @@ in {
enable = mkEnableOption (lib.mdDoc "Navidrome music server");
package = mkPackageOptionMD pkgs "navidrome" { };
settings = mkOption rec {
type = settingsFormat.type;
apply = recursiveUpdate default;
@ -36,7 +38,7 @@ in {
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = ''
${pkgs.navidrome}/bin/navidrome --configfile ${settingsFormat.generate "navidrome.json" cfg.settings}
${cfg.package}/bin/navidrome --configfile ${settingsFormat.generate "navidrome.json" cfg.settings}
'';
DynamicUser = true;
StateDirectory = "navidrome";