nix-gscheits/machines/raven/services/dnsmasq.nix
Jakob Lechner 12829bdedc
raven/laserkutter: use nginx as reverse proxy
We need to set the `Access-Control-Allow-Origin` header in order to
upload gcode with XHR
2022-01-13 22:34:39 +00:00

41 lines
917 B
Nix

{ pkgs, ... }:
{
services.dnsmasq = {
enable = true;
extraConfig = ''
bind-dynamic
expand-hosts
domain=lab.fablab-nea.de
dhcp-range=192.168.93.20,192.168.93.254,5m
dhcp-range=192.168.94.20,192.168.94.254,5m
dhcp-boot=lpxelinux.0,raven,192.168.94.1
cache-size=10000
dns-forward-max=1000
auth-zone=lab.fablab-nea.de,192.168.94.0/24
auth-server=lab.fablab-nea.de,78.47.224.251
no-hosts
addn-hosts=${pkgs.writeText "hosts.dnsmasq" ''
192.168.94.1 raven labsync unifi upload.laserkutter.lab.fablab-nea.de proxy.laserkutter.lab.fablab-nea.de
192.168.94.2 switch
''}
'';
servers = [
"142.250.185.78" # dns.as250.net
"2001:470:20::2" # ordns.he.net
"74.82.42.42" # ordns.he.net
];
};
networking.firewall = {
allowedUDPPorts = [ 53 67 ];
allowedTCPPorts = [ 53 ];
};
}