summaryrefslogtreecommitdiff
path: root/os/core/networking.nix
blob: 51b91965bbc4178b559bbc11240c471c81c9d7d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ config, lib, ... }:
let
  cfg = config.os.core.network;
in
{
  options.os.core.network.enable = lib.mkEnableOption "system-wide networking setup";
  config = lib.mkIf cfg.enable {
    networking = {
      networkmanager = {
        enable = true;
        wifi.macAddress = "stable-ssid";
        ethernet.macAddress = "stable-ssid";
      };
      firewall = {
        enable = true;
        allowedTCPPorts = [ 5222 ]; # SimpleX Chat
      };
    };
    systemd.services."NetworkManager-wait-online".enable = false;
  };
}