grocy: add package option

apply review from @SuperSandro2000

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
Markus S. Wamser 2023-07-23 21:55:54 +02:00
parent 40f0c0380b
commit 02f0dc8cff

View File

@ -8,6 +8,8 @@ in {
options.services.grocy = {
enable = mkEnableOption (lib.mdDoc "grocy");
package = mkPackageOptionMD pkgs "grocy" { };
hostName = mkOption {
type = types.str;
description = lib.mdDoc ''
@ -135,7 +137,7 @@ in {
services.nginx = {
enable = true;
virtualHosts."${cfg.hostName}" = mkMerge [
{ root = "${pkgs.grocy}/public";
{ root = "${cfg.package}/public";
locations."/".extraConfig = ''
rewrite ^ /index.php;
'';