aboutsummaryrefslogtreecommitdiff
path: root/hosts/sagittarius/network.nix
blob: 7dac3248bb4c76317b18adf6671d1b5a0d0a73a5 (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
{ flakeRoot, ... }:
{
  imports = [ (flakeRoot + /wireguard.nix) ];

  networking = {
    hostName = "sagittarius";
    useNetworkd = true;
    firewall = {
      allowedTCPPorts = [ 22 ];
    };
  };

  systemd.network = {
    enable = true;

    networks = {
      "10-wan" = {
        matchConfig.Name = "enp1s0";
        networkConfig.DHCP = "ipv4";
        address = [ "2a01:4f9:c012:c7a7::1/64" ];
        routes = [ { Gateway = "fe80::1"; } ];
      };
    };
  };
}