Unverified Commit b42ca6b9 authored by tomf's avatar tomf Committed by GitHub
Browse files

Merge pull request #260346 from l0b0/feat/shiori-webroot

nixos/shiori: add web root option
parents 6295cc31 8da85630
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";