mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-08-08 21:04:38 -05:00
feat: opencloud test
This commit is contained in:
parent
9a32cc9f72
commit
1e99a5aff9
1 changed files with 3 additions and 15 deletions
|
@ -1,22 +1,10 @@
|
||||||
{
|
{ config, flake, ... }:
|
||||||
config,
|
|
||||||
flake,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
let
|
||||||
inherit (flake.config.machines.devices) ceres;
|
inherit (flake.config.machines.devices) ceres;
|
||||||
inherit (flake.config.services.instances) opencloud web;
|
inherit (flake.config.services.instances) opencloud web;
|
||||||
service = opencloud;
|
service = opencloud;
|
||||||
localhost = web.localhost.address1;
|
localhost = web.localhost.address1;
|
||||||
host = service.domains.url0;
|
host = service.domains.url0;
|
||||||
|
|
||||||
secretValue = builtins.readFile config.sops.secrets."${service.name}-pass".path;
|
|
||||||
|
|
||||||
envFile = pkgs.writeText "${service.sops.path0}/opencloud.env" ''
|
|
||||||
ADMIN_PASSWORD=${secretValue}
|
|
||||||
OC_INSECURE=true
|
|
||||||
'';
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services = {
|
services = {
|
||||||
|
@ -26,7 +14,7 @@ in
|
||||||
port = service.ports.port0;
|
port = service.ports.port0;
|
||||||
address = localhost;
|
address = localhost;
|
||||||
stateDir = "/var/lib/${service.name}";
|
stateDir = "/var/lib/${service.name}";
|
||||||
environmentFile = envFile;
|
environmentFile = config.sops.secrets."${service.name}-pass".path;
|
||||||
};
|
};
|
||||||
caddy = {
|
caddy = {
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
|
@ -45,7 +33,7 @@ in
|
||||||
let
|
let
|
||||||
sopsPath = secret: {
|
sopsPath = secret: {
|
||||||
path = "${service.sops.path0}/${service.name}-${secret}";
|
path = "${service.sops.path0}/${service.name}-${secret}";
|
||||||
owner = "root";
|
owner = service.name;
|
||||||
mode = "600";
|
mode = "600";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue