rm photoprism

This commit is contained in:
2024-10-01 16:42:15 +03:00
parent e034b6f087
commit f7c2cadaf8
6 changed files with 0 additions and 57 deletions

View File

@@ -17,7 +17,6 @@
./node_exporter
./nsd-acme
./ping_exporter
./photoprism
./postfix
./remote-builder
./ssh8022

View File

@@ -1,41 +0,0 @@
{ config, lib, ... }:
let
cfg = config.mj.services.photoprism;
in
{
options.mj.services.photoprism = with lib.types; {
enable = lib.mkEnableOption "enable photoprism";
uidgid = lib.mkOption { type = int; };
paths = lib.mkOption { type = attrsOf str; };
passwordFile = lib.mkOption { type = str; };
};
config = lib.mkIf cfg.enable {
services.photoprism = {
inherit (cfg) passwordFile;
enable = true;
originalsPath = "/var/cache/photoprism/userdata";
};
systemd = {
tmpfiles.rules = [ "d /var/cache/photoprism/userdata 0700 photoprism photoprism -" ];
services.photoprism.serviceConfig = {
ProtectHome = lib.mkForce "tmpfs";
CacheDirectory = "photoprism";
BindPaths = lib.mapAttrsToList (
name: srcpath: "${srcpath}:/var/cache/photoprism/userdata/${name}"
) cfg.paths;
};
};
users = {
groups.photoprism.gid = cfg.uidgid;
users.photoprism = {
group = "photoprism";
uid = cfg.uidgid;
};
};
};
}