2019-11-06 23:04:16 +01:00
|
|
|
{ config, pkgs, lib, ... }:
|
2019-12-09 05:57:30 +01:00
|
|
|
|
|
|
|
let password = builtins.readFile /var/lib/ddclient/token;
|
|
|
|
|
|
|
|
in
|
2019-11-06 23:04:16 +01:00
|
|
|
{
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
ddclient
|
|
|
|
];
|
|
|
|
|
|
|
|
# Dynamic DNS configuration
|
|
|
|
services.ddclient = {
|
|
|
|
enable = true;
|
|
|
|
quiet = true;
|
2019-11-10 17:47:46 +01:00
|
|
|
protocol = "duckdns";
|
|
|
|
domains = [ "coolneng.duckdns.org" ];
|
2019-12-09 05:57:30 +01:00
|
|
|
inherit password;
|
2019-11-06 23:04:16 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
# Firewall configuration
|
|
|
|
networking.firewall = {
|
2019-11-11 03:29:00 +01:00
|
|
|
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
|
|
|
}
|
|
|
|
|