cluster/services/soda: move from VEGAS

This commit is contained in:
Max Headroom 2024-07-20 22:13:47 +02:00
parent c7f89489da
commit 63002031d6
5 changed files with 31 additions and 29 deletions

View file

@ -1,6 +1,11 @@
{ depot, ... }:
{
services.soda = {
nodes.host = [ "VEGAS" ];
nixos.host = ./host.nix;
};
monitoring.blackbox.targets.soda-machine = {
address = "soda.int.${depot.lib.meta.domain}:22";
module = "sshConnect";

View file

@ -0,0 +1,26 @@
{ depot, ... }:
{
containers.soda = {
path = depot.nixosConfigurations.soda.config.system.build.toplevel;
privateNetwork = true;
hostBridge = "vmdefault";
localAddress = "${depot.hours.soda.interfaces.primary.addr}/24";
autoStart = true;
bindMounts.sodaDir = {
hostPath = "/srv/storage/www/soda";
mountPoint = "/soda";
isReadOnly = false;
};
};
systemd.services."container@soda".after = [ "libvirtd.service" "sys-devices-virtual-net-vmdefault.device" ];
networking.nat.forwardPorts = [
{
sourcePort = 52222;
destination = "${depot.hours.soda.interfaces.primary.addr}:22";
proto = "tcp";
}
];
}

View file

@ -3,10 +3,6 @@ let
inherit (config.reflection) interfaces;
in
{
imports = [
./port-forward.nix
];
networking.nat = {
enable = true;
externalInterface = interfaces.primary.link;

View file

@ -1,11 +0,0 @@
{ depot, ... }:
{
networking.nat.forwardPorts = [
{
sourcePort = 52222;
destination = "${depot.hours.soda.interfaces.primary.addr}:22";
proto = "tcp";
}
];
}

View file

@ -88,18 +88,4 @@
system.stateVersion = "21.05";
services.openssh.settings.PasswordAuthentication = false;
containers.soda = {
path = depot.nixosConfigurations.soda.config.system.build.toplevel;
privateNetwork = true;
hostBridge = "vmdefault";
localAddress = "${depot.hours.soda.interfaces.primary.addr}/24";
autoStart = true;
bindMounts.sodaDir = {
hostPath = "/srv/storage/www/soda";
mountPoint = "/soda";
isReadOnly = false;
};
};
systemd.services."container@soda".after = [ "libvirtd.service" "sys-devices-virtual-net-vmdefault.device" ];
}