Unverified Commit 7c1a3674 authored by Felix Bühler's avatar Felix Bühler Committed by GitHub
Browse files

nixos/photoprism: add run config options (#438467)

parents fb2d0d69 af4ba50f
Loading
Loading
Loading
Loading
+15 −3
Original line number Diff line number Diff line
@@ -89,6 +89,18 @@ in
      '';
    };

    user = lib.mkOption {
      type = lib.types.str;
      default = "photoprism";
      description = "User under which photoprism runs.";
    };

    group = lib.mkOption {
      type = lib.types.str;
      default = "photoprism";
      description = "Group under which photoprism runs.";
    };

    package = lib.mkPackageOption pkgs "photoprism" { };

    settings = lib.mkOption {
@@ -110,11 +122,11 @@ in

      serviceConfig = {
        Restart = "on-failure";
        User = "photoprism";
        Group = "photoprism";
        User = cfg.user;
        Group = cfg.group;
        DynamicUser = true;
        StateDirectory = "photoprism";
        WorkingDirectory = "/var/lib/photoprism";
        WorkingDirectory = cfg.storagePath;
        RuntimeDirectory = "photoprism";
        ReadWritePaths = [
          cfg.originalsPath