mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-06 21:17:14 -06:00
feat: added actual
This commit is contained in:
parent
61d57e8563
commit
6bcec4faf7
4 changed files with 66 additions and 2 deletions
37
modules/config/instances/config/actual.nix
Normal file
37
modules/config/instances/config/actual.nix
Normal 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";
|
||||
};
|
||||
}
|
||||
|
|
@ -65,6 +65,7 @@ in
|
|||
comfyui
|
||||
prompter
|
||||
filesorter
|
||||
actual
|
||||
;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
24
modules/nixos/services/actual/default.nix
Normal file
24
modules/nixos/services/actual/default.nix
Normal 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
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -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 = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue