2019-02-26 13:44:40 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
2019-03-20 02:57:59 +01:00
|
|
|
firewallcfg = config.machine.firewall;
|
2019-02-26 13:44:40 +01:00
|
|
|
in {
|
|
|
|
networking = {
|
2019-03-17 11:43:14 +01:00
|
|
|
hostName = config.machine.hostName;
|
|
|
|
|
2019-02-26 13:44:40 +01:00
|
|
|
firewall = {
|
|
|
|
enable = true;
|
2019-03-17 11:43:14 +01:00
|
|
|
allowPing = firewallcfg.allowPing;
|
|
|
|
allowedUDPPorts = firewallcfg.allowedUDPPorts;
|
|
|
|
allowedTCPPorts = firewallcfg.allowedTCPPorts;
|
|
|
|
allowedUDPPortRanges = firewallcfg.allowedUDPPortRanges;
|
|
|
|
allowedTCPPortRanges = firewallcfg.allowedTCPPortRanges;
|
2019-02-26 13:44:40 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|