From 8da856302cf6cc4f76af1b74ae8484e3f730c76f Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Wed, 11 Oct 2023 16:26:10 +1300 Subject: nixos/shiori: add web root option Fixes #260328, allowing users to host the service somewhere other than the root of the host. Co-authored-by: h7x4 --- nixos/modules/services/web-apps/shiori.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'nixos/modules/services/web-apps') diff --git a/nixos/modules/services/web-apps/shiori.nix b/nixos/modules/services/web-apps/shiori.nix index f0505e052e1c..71b5ad4d4c06 100644 --- a/nixos/modules/services/web-apps/shiori.nix +++ b/nixos/modules/services/web-apps/shiori.nix @@ -29,6 +29,13 @@ in { default = 8080; description = lib.mdDoc "The port of the Shiori web application"; }; + + webRoot = mkOption { + type = types.str; + default = "/"; + example = "/shiori"; + description = lib.mdDoc "The root of the Shiori web application"; + }; }; }; @@ -40,7 +47,7 @@ in { environment.SHIORI_DIR = "/var/lib/shiori"; serviceConfig = { - ExecStart = "${package}/bin/shiori serve --address '${address}' --port '${toString port}'"; + ExecStart = "${package}/bin/shiori serve --address '${address}' --port '${toString port}' --webroot '${webRoot}'"; DynamicUser = true; StateDirectory = "shiori"; -- cgit 1.4.1