Differentiate between dev and prod for api and nginx

This commit is contained in:
thiloho
2024-08-14 19:33:41 +02:00
parent cf1600671b
commit 0e3fb96dda
18 changed files with 85 additions and 128 deletions

View File

@@ -39,8 +39,8 @@
}
{
from = "host";
host.port = 80;
guest.port = 80;
host.port = 18000;
guest.port = 1800;
}
];
};
@@ -63,7 +63,7 @@
listen = [
{
addr = "0.0.0.0";
port = 80;
port = 1800;
}
];
locations = {

View File

@@ -1,56 +0,0 @@
{
pkgs,
lib,
modulesPath,
localArchtikaPackage,
...
}:
{
imports = [
"${modulesPath}/virtualisation/qemu-vm.nix"
./module.nix
];
networking = {
hostName = "archtika-module-test";
firewall.enable = false;
};
nix.settings.experimental-features = [ "nix-command flakes" ];
users.users.dev = {
isNormalUser = true;
extraGroups = [ "wheel" ];
password = "dev";
};
virtualisation = {
graphics = false;
# Alternatively a bridge network for QEMU could be setup, but requires much more effort
forwardPorts = [
{
from = "host";
host.port = 5000;
guest.port = 5000;
}
{
from = "host";
host.port = 10000;
guest.port = 10000;
}
{
from = "host";
host.port = 15000;
guest.port = 15000;
}
];
};
services.archtika = {
enable = true;
package = localArchtikaPackage;
jwtSecret = "a42kVyAhTImYxZeebZkApoAZLmf0VtDA";
};
system.stateVersion = "24.05";
}