nixos/config/networking.nix

19 lines
450 B
Nix
Raw Normal View History

{ config, ... }:
2019-02-26 13:44:40 +01:00
let
firewallcfg = config.machine.firewall;
2019-02-26 13:44:40 +01:00
in {
networking = {
hostName = config.machine.hostName;
2019-02-26 13:44:40 +01:00
firewall = {
enable = true;
allowPing = firewallcfg.allowPing;
allowedUDPPorts = firewallcfg.allowedUDPPorts;
allowedTCPPorts = firewallcfg.allowedTCPPorts;
allowedUDPPortRanges = firewallcfg.allowedUDPPortRanges;
allowedTCPPortRanges = firewallcfg.allowedTCPPortRanges;
2019-02-26 13:44:40 +01:00
};
};
}