ombi: allow overriding package in module (#345814)

* ombi: allow overriding package in module

* nixos/ombi: replace explicit bin path with getExe function

Co-authored-by: Anderson Torres <torres.anderson.85@protonmail.com>

---------

Co-authored-by: Anderson Torres <torres.anderson.85@protonmail.com>
This commit is contained in:
Sleeping-Donut 2024-11-09 11:05:54 +00:00 committed by GitHub
parent 112d505ce4
commit df20742283
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -12,6 +12,8 @@ in {
on how to set up a reverse proxy
'';
package = lib.mkPackageOption pkgs "ombi" { };
dataDir = lib.mkOption {
type = lib.types.str;
default = "/var/lib/ombi";
@ -58,7 +60,7 @@ in {
Type = "simple";
User = cfg.user;
Group = cfg.group;
ExecStart = "${pkgs.ombi}/bin/Ombi --storage '${cfg.dataDir}' --host 'http://*:${toString cfg.port}'";
ExecStart = "${lib.getExe cfg.package} --storage '${cfg.dataDir}' --host 'http://*:${toString cfg.port}'";
Restart = "on-failure";
};
};