aboutsummaryrefslogtreecommitdiff
path: root/systems/x86_64-linux/c-pc/network.nix
blob: db3ff798120d34ac11628139dbf40452bf20d373 (plain)
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
{ ... }:

{
  networking = {
    useDHCP = true;

    wireless = {
      enable = true;
      
      # Import /etc/wpa_supplicant.conf networks
      allowAuxiliaryImperativeNetworks = true;
    };

    firewall = {
      enable = false;

      allowedTCPPorts = [
        8096 # jellyfin
        50000 # qbittorrent
      ];
      
      allowedUDPPorts = [
        51820 # wireguard
      ];
    };

    wg-quick.interfaces.wg0.configFile = "/secrets/wireguard.conf";
  };

  environment.etc."wpa_supplicant.conf" = {
    source = "/secrets/wireless.conf";
  };
}