Compare commits

..

2 Commits

Author SHA1 Message Date
5f173b8a2d
feat(hosts/luna): redirect blog to main domain
Some checks failed
Check Formatting of Files / Check-Formatting (push) Failing after 49s
2024-08-16 02:45:41 -05:00
02246e3b5d
fix(hosts/luna): make gitea actions depend on gitea service 2024-08-16 02:45:17 -05:00
2 changed files with 30 additions and 11 deletions

View File

@ -3,6 +3,7 @@
fqdn, fqdn,
inputs, inputs,
pkgs, pkgs,
lib,
... ...
}: }:
let let
@ -137,6 +138,17 @@ in
}; };
}; };
# TODO: Upstream the below to Nixpkgs. If the runner is using the exact same url as the gitea
# service and both are on the same host, then the runner should have a systemd dependency on the
# gitea service.
systemd.services.gitea-actions-default.requires = lib.mkIf (
config.services.gitea.enable
&& (
config.services.gitea-actions-runner.instances.default.url
== config.services.gitea.settings.server.ROOT_URL
)
) [ "gitea.service" ];
networking.firewall.allowedTCPPorts = [ config.services.gitea.settings.server.SSH_PORT ]; networking.firewall.allowedTCPPorts = [ config.services.gitea.settings.server.SSH_PORT ];
environment.persistence.save.directories = [ environment.persistence.save.directories = [

View File

@ -18,16 +18,23 @@
defaults.email = "price@orion-technologies.io"; defaults.email = "price@orion-technologies.io";
}; };
services.nginx.virtualHosts."blog.${fqdn}" = { services.nginx.virtualHosts = {
forceSSL = true; "blog.${fqdn}" = {
enableACME = true; forceSSL = true;
root = inputs.blog.packages.${pkgs.system}.default; enableACME = true;
locations."/".extraConfig = '' globalRedirect = "price-hiller.com";
if ($request_uri ~ ^/(.*)\.html(\?|$)) { };
return 302 /$1; "price-hiller.com" = {
} forceSSL = true;
try_files $uri $uri.html $uri/ =404; enableACME = true;
''; root = inputs.blog.packages.${pkgs.system}.default;
locations."/".index = "home.html"; locations."/".extraConfig = ''
if ($request_uri ~ ^/(.*)\.html(\?|$)) {
return 302 /$1;
}
try_files $uri $uri.html $uri/ =404;
'';
locations."/".index = "home.html";
};
}; };
} }