dotfiles/modules/config/instances/config/photoprism.nix
2025-12-10 18:09:00 -06:00

63 lines
1.2 KiB
Nix
Executable file

{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain0
sslPath
varPath
mntPath
secretPath
;
label = "Photoprism";
name = "photoprism";
short = "prism";
in
{
label = label;
name = name;
short = label;
tags = [
name
"photo"
"images"
];
ports = {
port0 = 2342;
};
interfaces = {
interface0 =
let
domain = "${short}.${domain0}";
secrets = "${secretPath}/${name}";
ssl = "${sslPath}/${domain}";
in
{
domain = domain;
subdomain = short;
microvm = {
id = "vm-${short}";
mac = "02:00:00:00:69:79";
idUser = "vmuser-${short}";
macUser = "02:00:00:00:00:79";
ip = "192.168.50.79";
gate = "192.168.50.1";
ssh = 2579;
};
ssl = {
path = ssl;
cert = "${ssl}/fullchain.pem";
key = "${ssl}/key.pem";
};
paths = {
varPaths = {
path0 = "${varPath}/${label}";
};
mntPaths = {
path0 = "${mntPath}/${name}";
};
secretPaths = {
path0 = secrets;
};
};
};
};
}