3 inherit (config.users) users;
4 domain = config.networking.domain;
5 inherit (config.services) freeciv;
8 networking.nftables.ruleset = ''
11 tcp dport ${toString freeciv.settings.port} counter accept comment "Freeciv"
15 users.users.freeciv.isSystemUser = true;
16 users.groups.acme.members = [ users."freeciv".name ];
17 security.acme.certs."${domain}" = {
19 #postRun = "systemctl reload freeciv";
21 systemd.services.freeciv = {
22 wants = [ "acme-selfsigned-${domain}.service" "acme-${domain}.service" ];
23 after = [ "acme-selfsigned-${domain}.service" ];
25 services.upnpc.enable = true;
26 services.upnpc.redirections = [
29 externalPort = freeciv.settings.port;
31 service.wantedBy = [ "freeciv.service" ];
32 service.partOf = [ "freeciv.service" ];