puter/classes/desktop/networking.nix

43 lines
942 B
Nix
Raw Normal View History

2024-12-01 04:03:34 +00:00
{config, ...}: let
inherit (config.users) mainUser;
in {
2024-12-01 03:05:16 +00:00
services.resolved.enable = true;
2024-12-01 04:03:34 +00:00
# TODO
2024-12-01 03:05:16 +00:00
networking = {
networkmanager = {
enable = true;
dns = "systemd-resolved";
};
firewall = {
allowedTCPPorts = [
# Spotify track sync
57621
# Steam Remote Play
27036
# Source Dedicated Server SRCDS Rcon port
27015
# Syncthing TCP based sync protocol traffic
22000
];
allowedUDPPorts = [
# Source Dedicated Server gameplay traffic
27015
# Syncthing QUIC based sync protocol traffic
22000
# Syncthing port for discovery broadcasts on IPv4 and multicasts on IPv6
21027
];
allowedUDPPortRanges = [
# Steam Remote Play
{
from = 27031;
to = 27036;
}
];
};
};
2024-12-01 04:03:34 +00:00
users.users.${mainUser}.extraGroups = ["networkmanager"];
2024-12-01 03:05:16 +00:00
}