1 { pkgs, lib, config, ... }:
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.redirections = [
27 externalPort = freeciv.settings.port; protocol = "TCP";
28 service.wantedBy = ["freeciv.service"];
29 service.partOf = ["freeciv.service"];