mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-08 05:49:25 -06:00
feat: added nextcloud and opencloud to eris
This commit is contained in:
parent
090e4770d2
commit
fd46841bfb
12 changed files with 157 additions and 70 deletions
|
|
@ -7,7 +7,6 @@
|
|||
let
|
||||
inherit (flake.config.people) user0;
|
||||
inherit (flake.config.people.users.${user0}) name;
|
||||
inherit (flake.config.machines.devices) ceres;
|
||||
inherit (flake.config.services.instances)
|
||||
nextcloud
|
||||
nginx
|
||||
|
|
@ -17,28 +16,7 @@ let
|
|||
service = nextcloud;
|
||||
localhost = web.localhost.address0;
|
||||
host = service.domains.url0;
|
||||
hostname = config.networking.hostName;
|
||||
|
||||
bindMount = {
|
||||
fileSystems."/var/lib/${service.name}" = {
|
||||
device = service.paths.path0;
|
||||
fsType = "none";
|
||||
options = [
|
||||
"bind"
|
||||
];
|
||||
depends = [
|
||||
ceres.storage0.mount
|
||||
];
|
||||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"Z ${service.paths.path0} 750 ${service.name} ${service.name} -"
|
||||
"Z ${service.paths.path0}/config 750 ${service.name} ${service.name} -"
|
||||
"Z ${service.sops.path0} 750 ${service.name} ${service.name} -"
|
||||
];
|
||||
};
|
||||
|
||||
hostLogic = if hostname == ceres.name then bindMount else { };
|
||||
in
|
||||
{
|
||||
services = {
|
||||
|
|
@ -93,7 +71,7 @@ in
|
|||
enable = true;
|
||||
virtualHosts.${host}.listen = [
|
||||
{
|
||||
addr = web.localhost.address1;
|
||||
addr = localhost;
|
||||
port = nginx.ports.port0;
|
||||
}
|
||||
];
|
||||
|
|
@ -102,9 +80,9 @@ in
|
|||
caddy = {
|
||||
virtualHosts = {
|
||||
"${host}" = {
|
||||
listenAddresses = [ web.localhost.address1 ];
|
||||
extraConfig = ''
|
||||
reverse_proxy ${localhost}:${toString nginx.ports.port0}
|
||||
|
||||
tls ${service.ssl.cert} ${service.ssl.key}
|
||||
'';
|
||||
};
|
||||
|
|
@ -149,4 +127,3 @@ in
|
|||
};
|
||||
};
|
||||
}
|
||||
// hostLogic
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue