From 5e7a0da84af9244d6cb22f00e689a86fd89e432a Mon Sep 17 00:00:00 2001 From: Azalea Gardenia Date: Fri, 19 Apr 2024 21:20:08 +0200 Subject: [PATCH] Added promotional.yugoslavia.best --- hosts/lucent-firepit/webapps/default.nix | 28 +++++++++++++------ modules/services/update-itl.nix | 34 ++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 8 deletions(-) create mode 100644 modules/services/update-itl.nix diff --git a/hosts/lucent-firepit/webapps/default.nix b/hosts/lucent-firepit/webapps/default.nix index ad0a87d..bb3f974 100644 --- a/hosts/lucent-firepit/webapps/default.nix +++ b/hosts/lucent-firepit/webapps/default.nix @@ -13,8 +13,18 @@ in { enable = true; domain = "nlw.oat.zone"; apiKey = builtins.readFile /etc/sheets-api-key; + #apiKey = ""; port = 1995; }; + services.cardgen = { + enable = true; + port = 25290; + }; + services.gd-icon-renderer-web = { + enable = true; + port = 3435; + domain = "gdicon.oat.zone"; + }; modules = { services = { @@ -63,6 +73,7 @@ in { "giger.yugoslavia.fishing".dataDir = "/var/www/giger.yugoslavia.fishing"; "modfiles.oat.zone".dataDir = "/var/www/modfiles.oat.zone"; "shop.yugoslavia.best".dataDir = "/var/www/shop.yugoslavia.best"; + "shop.yugoslavia.best".forceSSL = false; "tesco-underground-dev.oat.zone".dataDir = "/var/www/tesco-underground-dev.oat.zone"; "tesco-underground-dev.oat.zone".auth = { tesco = builtins.readFile /etc/tesco; }; "oat.zone".dataDir = "/var/www/oat.zone"; @@ -82,7 +93,11 @@ in { "mayf.pink".dataDir = "/var/www/mayf.pink"; "mayf.pink".php = true; "mayf.pink".phpHandlePathing = true; + "promotion.yugoslavia.best".dataDir = "/var/www/promotion.yugoslavia.best/public" + "promotion.yugoslavia.best".php = true; + "promotion.yugoslavia.best".phpHandlePathing = true; "star.yugoslavia.best".dataDir = "/var/www/star.yugoslavia.best"; + "star.yugoslavia.best".forceSSL = false; #"wint0r.zone".dataDir = "/var/www/wint0r.zone"; #"puzzle.wint0r.zone".dataDir = "/var/www/puzzle.wint0r.zone"; "femboy.industries".dataDir = "/var/www/femboy.industries"; @@ -127,6 +142,11 @@ in { locations."/f/".extraConfig = '' add_header Access-Control-Allow-Origin "*"; ''; + locations."/f/cards/gen".extraConfig = '' + rewrite /f/cards/gen/(.*) /$1 break; + proxy_pass http://127.0.0.1:25290; + proxy_redirect off; + ''; extraConfig = '' error_page 404 /404.html; error_page 403 /403.html; @@ -151,14 +171,6 @@ in { ''; }; # todo: move to flake - "gdicon.oat.zone" = { - enableACME = true; - forceSSL = true; - locations."/" = { - proxyPass = "http://127.0.0.1:3436/"; - }; - }; - # todo: move to flake "jillo.oat.zone" = { enableACME = true; forceSSL = true; diff --git a/modules/services/update-itl.nix b/modules/services/update-itl.nix new file mode 100644 index 0000000..2e73fb5 --- /dev/null +++ b/modules/services/update-itl.nix @@ -0,0 +1,34 @@ +{ config, lib, pkgs, options, inputs, ... }: + +with lib; +let + cfg = config.modules.services.update-idl; +in { + options.modules.services.update-idl = { + enable = mkOption { + type = types.bool; + default = false; + }; + }; + + config = mkIf cfg.enable { + systemd.timers."update-itl" = { + wantedBy = [ "timers.target" ]; + timerConfig = { + OnBootSec = "60m"; + OnUnitActiveSec = "60m"; + Unit = "update-itl.service"; + }; + }; + + systemd.services."update-itl" = { + script = '' + ${pkgs.curl} -X POST https://mayf.pink/itl/update -H "Connection: Spiritual" + ''; + serviceConfig = { + Type = "oneshot"; + User = "root"; + }; + }; + }; +}