44 lines
721 B
Nix
44 lines
721 B
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
let password = builtins.readFile /var/lib/ddclient/token;
|
|
|
|
in
|
|
{
|
|
|
|
# Enable zeroconf
|
|
services.avahi = {
|
|
enable = true;
|
|
nssmdns = true;
|
|
publish = {
|
|
enable = true;
|
|
userServices = true;
|
|
};
|
|
};
|
|
|
|
|
|
# Dynamic DNS configuration
|
|
services.ddclient = {
|
|
enable = true;
|
|
quiet = true;
|
|
protocol = "duckdns";
|
|
domains = [ "coolneng.duckdns.org" ];
|
|
inherit password;
|
|
};
|
|
|
|
# Firewall configuration
|
|
networking.firewall = {
|
|
allowedTCPPorts = [
|
|
631 # Cups
|
|
6566 # SANE
|
|
80
|
|
443
|
|
];
|
|
autoLoadConntrackHelpers = true;
|
|
connectionTrackingModules = [ "sane" ];
|
|
};
|
|
|
|
# Disable IPv6
|
|
networking.enableIPv6 = false;
|
|
}
|
|
|