worked with megan

This commit is contained in:
2025-06-07 22:17:30 -04:00
parent 3abd04ec5e
commit 4e99c54c12
2 changed files with 46 additions and 19 deletions

View File

@@ -1,21 +1,48 @@
{
config,
pkgs,
lib,
...
}:
let let
vars = import ../vars.nix; vars = import ../vars.nix;
in in
{ {
config,
... # environment.systemPackages = with pkgs; [ php.withExtensions ({ all, ... }: [ all.pdo_pgsql ]) ];
}:
{ services.httpd = {
virtualisation.oci-containers.containers.great_cloud_of_witnesses = { enable = true;
image = "ubuntu/apache2:2.4-22.04_beta"; adminAddr = "webmaster@localhost";
ports = [ "8092:80" ];
volumes = [ enablePHP = true;
"${../../../common/docker_templates}/file_server/sites/:/etc/apache2/sites-enabled/" phpPackage = pkgs.php.withExtensions (
"${vars.services}/great_cloud_of_witnesses:/data" { enabled, all }:
"/var/run/mysqld/mysqld.sock:/var/run/mysqld/mysqld.sock" enabled
]; ++ [
extraOptions = [ "--network=web" ]; all.pdo
autoStart = true; all.pdo_pgsql
]
);
extraModules = [ "rewrite" ];
virtualHosts.great_cloud_of_witnesses = {
hostName = "localhost";
listen = [
{
ip = "*";
port = 8092;
}
];
documentRoot = "${vars.services}/great_cloud_of_witnesses";
extraConfig = ''
<Directory "${vars.services}/great_cloud_of_witnesses">
AllowOverride All
Require all granted
</Directory>
'';
};
}; };
sops.secrets.gcw_password = { sops.secrets.gcw_password = {
@@ -26,7 +53,7 @@ in
users = { users = {
users.gcw = { users.gcw = {
isSystemUser = true; isSystemUser = true;
hashedPasswordFile = "${config.sops.secrets.gcw_password.path}"; hashedPasswordFile = config.sops.secrets.gcw_password.path;
group = "gcw"; group = "gcw";
}; };
groups.gcw = { }; groups.gcw = { };

View File

@@ -31,7 +31,7 @@ frontend ContentSwitching
acl host_homeassistant hdr(host) -i homeassistant.tmmworkshop.com acl host_homeassistant hdr(host) -i homeassistant.tmmworkshop.com
acl host_jellyfin hdr(host) -i jellyfin.tmmworkshop.com acl host_jellyfin hdr(host) -i jellyfin.tmmworkshop.com
acl host_share hdr(host) -i share.tmmworkshop.com acl host_share hdr(host) -i share.tmmworkshop.com
acl host_uptime_kuma hdr(host) -i uptimekuma-jeeves.tmmworkshop.com acl host_gcw hdr(host) -i gcw.tmmworkshop.com
use_backend audiobookshelf_nodes if host_audiobookshelf use_backend audiobookshelf_nodes if host_audiobookshelf
use_backend cache_nodes if host_cache use_backend cache_nodes if host_cache
@@ -39,7 +39,7 @@ frontend ContentSwitching
use_backend homeassistant_nodes if host_homeassistant use_backend homeassistant_nodes if host_homeassistant
use_backend jellyfin if host_jellyfin use_backend jellyfin if host_jellyfin
use_backend share_nodes if host_share use_backend share_nodes if host_share
use_backend uptime_kuma_nodes if host_uptime_kuma use_backend gcw_nodes if host_gcw
backend audiobookshelf_nodes backend audiobookshelf_nodes
mode http mode http
@@ -68,6 +68,6 @@ backend share_nodes
mode http mode http
server server 127.0.0.1:8091 server server 127.0.0.1:8091
backend uptime_kuma_nodes backend gcw_nodes
mode http mode http
server server 127.0.0.1:3001 server server 127.0.0.1:8092