feat: added actual

This commit is contained in:
Nick 2025-10-09 01:45:40 -05:00
parent 61d57e8563
commit 6bcec4faf7
4 changed files with 66 additions and 2 deletions

View file

@ -0,0 +1,37 @@
{ moduleFunctions }:
let
inherit (moduleFunctions.instancesFunctions)
domain0
servicePath
sslPath
sopsPath
;
label = "Actual";
name = "actual";
domain = "${name}.${domain0}";
in
{
label = label;
name = name;
short = label;
sops = {
path0 = "${sopsPath}/${name}";
};
domains = {
url0 = domain;
};
tags = [
];
subdomain = name;
paths = {
path0 = "${servicePath}/${label}";
path1 = "${servicePath}/${label}/cache";
};
ports = {
port0 = 3000;
};
ssl = {
cert = "${sslPath}/${name}.${domain0}/fullchain.pem";
key = "${sslPath}/${name}.${domain0}/key.pem";
};
}

View file

@ -65,6 +65,7 @@ in
comfyui
prompter
filesorter
actual
;
};
};

View file

@ -0,0 +1,24 @@
{ flake, ... }:
let
inherit (flake.config.services.instances) actual web;
service = actual;
localhost = web.ip.address1;
in
{
services = {
actual = {
enable = true;
settings = {
port = service.ports.port0;
hostname = localhost;
};
};
};
networking = {
firewall = {
allowedTCPPorts = [
service.ports.port0
];
};
};
}

View file

@ -49,10 +49,12 @@ in
{
"/var/lib/${service.name}" = {
device = service.paths.path0;
} // settings;
}
// settings;
"/var/cache/${service.name}" = {
device = "${service.paths.path1}";
} // settings;
}
// settings;
};
systemd.tmpfiles.rules = [