Unverified Commit 8da85630 authored by Victor Engmark's avatar Victor Engmark
Browse files

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: default avatarh7x4 <h7x4@nani.wtf>
parent de635523
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -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";