raven/labsync: init

Most of it is implemented in docker, which is not managed in this
repository. This only adds the settings required on the system side.
This commit is contained in:
Simon Bruder 2021-11-13 13:08:37 +01:00
parent 8f76f9c0e2
commit 84c7390483
No known key found for this signature in database
GPG key ID: 8D3C82F9F309F8EC
3 changed files with 41 additions and 0 deletions

View file

@ -63,5 +63,14 @@
virtualisation.docker.enable = true;
services.nginx.enable = true;
networking.firewall.allowedTCPPorts = [ 80 443 ];
# FIXME
networking.hosts = {
"192.168.94.1" = [ "raven.lab.fablab-nea.de" "labsync.lab.fablab-nea.de" ];
};
system.stateVersion = "21.05";
}

View file

@ -1,5 +1,6 @@
{
imports = [
./dnsmasq.nix
./labsync.nix
];
}

View file

@ -0,0 +1,31 @@
# legacy labsync, currently partly implemented in docker outside of this configuration
{
services.opentracker.enable = true;
services.nginx.virtualHosts."labsync.lab.fablab-nea.de" = {
locations = {
"/" = {
root = "/opt/docker/tftpgen/data";
extraConfig = ''
autoindex on;
'';
};
"/generator/".proxyPass = "http://127.0.0.1:8695/";
};
};
services.atftpd = {
enable = true;
root = "/opt/docker/tftpgen/tftp";
};
networking.firewall.allowedTCPPorts = [
6881 # aria2
6969 # opentracker
];
networking.firewall.allowedUDPPorts = [
6882 # aria2
69 # tftpd
6969 # opentracker
];
}