nixos/config/networking.nix

19 lines
461 B
Nix
Raw Normal View History

2019-02-26 13:44:40 +01:00
{ config, lib, pkgs, ... }:
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
};
};
}