zion/modules/networking.nix

37 lines
626 B
Nix
Raw Normal View History

2019-11-06 23:04:16 +01:00
{ config, pkgs, lib, ... }:
let password = builtins.readFile /var/lib/ddclient/token;
in
2019-11-06 23:04:16 +01:00
{
environment.systemPackages = with pkgs; [
ddclient
];
2019-11-06 23:04:16 +01:00
# Dynamic DNS configuration
services.ddclient = {
enable = true;
quiet = true;
2019-11-10 17:47:46 +01:00
protocol = "duckdns";
domains = [ "coolneng.duckdns.org" ];
inherit password;
2019-11-06 23:04:16 +01:00
};
# Firewall configuration
networking.firewall = {
allowedTCPPorts = [
631 # Cups
6566 # SANE
80
443
];
2019-11-06 23:04:16 +01:00
autoLoadConntrackHelpers = true;
connectionTrackingModules = [ "sane" ];
};
2019-11-11 14:30:45 +01:00
2019-12-09 10:04:41 +01:00
# Disable IPv6
networking.enableIPv6 = false;
2019-11-06 23:04:16 +01:00
}