update hyperhive, move some settings

This commit is contained in:
müde 2026-08-30 20:58:52 +02:00
commit a695aa408b
3 changed files with 50 additions and 31 deletions

View file

@ -1,16 +1,16 @@
{ pkgs, config, lib, ... }:
{
pkgs,
config,
lib,
...
}:
{
imports = [
./containers.nix
./hardware.nix
];
config =
let
gw = config.services.hyperhive.gateway;
old = "forge.pr1ma.darkest.space";
new = "forge.constellation.darkest.space";
in
config = lib.mkMerge [
{
my = {
# keep-sorted start
@ -67,22 +67,46 @@
];
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
}
my.constellation-swarm = {
enable = true;
hiveName = "pr1ma";
};
services.hyperhive.enableAllLocalDefaults = true;
services.nginx.enable = true;
(
let
old = "forge.pr1ma.darkest.space";
new = "forge.constellation.darkest.space";
in
{
my.constellation-swarm = {
enable = true;
hiveName = "pr1ma";
};
services.hyperhive = {
deploy = {
singleHostSwarm = true;
forgejo.ci = {
enable = true;
concurrency = 2;
};
};
# DNS: the hive's resolver must still answer for the old name, or
# nothing ever reaches the redirect. The forge module drops it from
# this list the moment you change `swarm.forge.domain`.
services.hyperhive.gateway.localNames = [ old ];
# DNS: the hive's resolver must still answer for the old name, or
# nothing ever reaches the redirect. The forge module drops it from
# this list the moment you change `swarm.forge.domain`.
gateway.localNames = [ old ];
};
services.nginx.enable = true;
services.nginx.virtualHosts.${old} = (gw.lib.tlsFor old) // {
listen = gw.lib.listen;
locations."/".return = "301 https://${new}$request_uri";
};
};
services.nginx.virtualHosts.${old} =
let
gw = config.services.hyperhive.gateway;
in
(gw.lib.tlsFor old)
// {
listen = gw.lib.listen;
locations."/".return = "301 https://${new}$request_uri";
};
#containers.swarm-authelia.config.services.authelia.instances.swarm.settings.log.level =lib.mkForce "debug";
}
)
];
}