mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-07 21:42:16 -06:00
chore: removed services for now
This commit is contained in:
parent
fd46841bfb
commit
0dbcbb6b19
11 changed files with 113 additions and 44 deletions
|
|
@ -1,16 +1,15 @@
|
|||
{ config, flake, ... }:
|
||||
let
|
||||
inherit (flake.config.machines.devices) ceres;
|
||||
inherit (flake.config.services.instances) opencloud web;
|
||||
inherit (flake.config.services.instances) opencloud web caddy;
|
||||
service = opencloud;
|
||||
localhost = web.localhost.address0;
|
||||
localhost = web.localhost.address1;
|
||||
host = service.domains.url0;
|
||||
in
|
||||
{
|
||||
services = {
|
||||
opencloud = {
|
||||
enable = true;
|
||||
url = "https://${host}";
|
||||
url = "http://${localhost}:${toString service.ports.port0}";
|
||||
port = service.ports.port0;
|
||||
address = localhost;
|
||||
stateDir = "/var/lib/${service.name}";
|
||||
|
|
@ -18,20 +17,14 @@ in
|
|||
};
|
||||
caddy = {
|
||||
virtualHosts = {
|
||||
"${host}" = {
|
||||
":${toString caddy.ports.port4}" = {
|
||||
extraConfig = ''
|
||||
reverse_proxy https://${localhost}:${toString service.ports.port0} {
|
||||
transport http {
|
||||
tls_insecure_skip_verify
|
||||
}
|
||||
}
|
||||
tls ${service.ssl.cert} ${service.ssl.key}
|
||||
reverse_proxy http://${localhost}:${toString service.ports.port0}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
sops =
|
||||
let
|
||||
sopsPath = secret: {
|
||||
|
|
@ -53,10 +46,17 @@ in
|
|||
);
|
||||
};
|
||||
|
||||
systemd = {
|
||||
tmpfiles.rules = [
|
||||
"Z ${service.sops.path0} 755 ${service.name} ${service.name} -"
|
||||
];
|
||||
};
|
||||
|
||||
networking = {
|
||||
firewall = {
|
||||
allowedTCPPorts = [
|
||||
service.ports.port0
|
||||
caddy.ports.port4
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue