aboutsummaryrefslogtreecommitdiff
path: root/nixos/configurations/zd-one0.nix
blob: 98d96912dbd579df80c3b1c2103d6fc0ab0f9c12 (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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
_: {
  system.stateVersion = "25.11";
  deploy = {
    enable = true;
    ssh.host = "zd-one0";
  };

  cynerd = {
    openwrtone = true;
    #switch = {
    #  enable = true;
    #  lanAddress = "10.8.12.10/24";
    #  lanGateway = config.cynerd.hosts.spt.omnia;
    #};
    #wifiAP.zd = {
    #  enable = false;
    #  qca988x = {
    #    interface = "wlp1s0";
    #    bssids = config.secrets.wifiMacs.zd-mox.qca988x;
    #    channel = 36;
    #  };
    #};
  };

  boot.initrd.availableKernelModules = ["dm-mod"];
  boot.consoleLogLevel = 7;

  services = {
    journald.extraConfig = ''
      SystemMaxUse=8G
    '';

    btrfs.autoScrub = {
      enable = true;
      fileSystems = ["/"];
    };

    fail2ban = {
      enable = true;
      ignoreIP = ["10.8.0.0/24" "10.8.1.0/24" "10.8.2.0/24"];
    };
  };

  networking.useDHCP = false;
  networking.useNetworkd = true;

  systemd.network = {
    networks = {
      "eth0" = {
        matchConfig.Name = "eth0";
        networkConfig = {
          Address = "10.8.2.10/24";
          Gateway = "10.8.2.1";
          DNS = "1.1.1.1";
          IPv6AcceptRA = "yes";
        };
      };
    };
    wait-online.anyInterface = true;
  };
}