2019-02-26 13:44:40 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = import ("/etc/nixos/machines/" + (builtins.replaceStrings ["\n"] [""] (builtins.readFile /etc/hostname)) + "/configuration.nix");
|
|
|
|
in {
|
|
|
|
networking = {
|
|
|
|
hostName = cfg.conf.networking.hostName;
|
|
|
|
# should probably add some etc file for this....
|
|
|
|
firewall = {
|
|
|
|
enable = true;
|
|
|
|
allowPing = cfg.conf.networking.firewall.allowPing;
|
|
|
|
allowedUDPPorts = cfg.conf.networking.firewall.allowedUDPPorts;
|
|
|
|
allowedTCPPorts = cfg.conf.networking.firewall.allowedTCPPorts;
|
2019-03-04 10:35:50 +01:00
|
|
|
allowedUDPPortRanges = cfg.conf.networking.firewall.allowedUDPPortRanges;
|
|
|
|
allowedTCPPortRanges = cfg.conf.networking.firewall.allowedTCPPortRanges;
|
2019-02-26 13:44:40 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|