-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainsail.nix
38 lines (33 loc) · 984 Bytes
/
mainsail.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ ... }:
let
ports = import ./misc/service-ports.nix;
addresses = import ../../misc/wireguard-addresses.nix;
in {
services.mainsail = {
enable = true;
nginx.listen = [
{
addr = "127.0.0.1";
port = ports.mainsail;
}
{
addr = addresses.gradientnet.beatrice;
port = ports.mainsail;
}
{
addr = addresses.lilynet.beatrice;
port = ports.mainsail;
}
];
nginx.serverAliases = [
"beatrice.gradient"
"beatrice.lily"
];
};
# Increase max upload size for uploading gcode files from PrusaSlicer
services.nginx.clientMaxBodySize = "1000m";
networking.firewall.interfaces.gradientnet.allowedTCPPorts = [ ports.mainsail ];
networking.firewall.interfaces.gradientnet.allowedUDPPorts = [ ports.mainsail ];
networking.firewall.interfaces.lilynet.allowedTCPPorts = [ ports.mainsail ];
networking.firewall.interfaces.lilynet.allowedUDPPorts = [ ports.mainsail ];
}