···3737 '';
3838 };
39394040+ openFirewall = mkOption {
4141+ type = types.bool;
4242+ default = false;
4343+ description = ''
4444+ Whether to open the necessary port in the firewall for spacecookie.
4545+ '';
4646+ };
4747+4048 port = mkOption {
4149 type = types.port;
4250 default = 70;
4351 description = ''
4444- Port the gopher service should be exposed on. The
4545- firewall is not opened automatically.
5252+ Port the gopher service should be exposed on.
4653 '';
4754 };
4855···99106 # AF_INET replaced by BindIPv6Only=both
100107 RestrictAddressFamilies = "AF_UNIX AF_INET6";
101108 };
109109+ };
110110+111111+ networking.firewall = mkIf cfg.openFirewall {
112112+ allowedTCPPorts = [ cfg.port ];
102113 };
103114 };
104115}