1 { pkgs, lib, config, ... }:
3 inherit (config.users) users;
4 domain = config.networking.domain;
5 inherit (config.services) freeciv;
8 networking.nftables.ruleset = ''
9 add rule inet filter net2fw tcp dport ${toString freeciv.settings.port} counter accept comment "Freeciv"
11 users.users.freeciv.isSystemUser = true;
12 users.groups.acme.members = [ users."freeciv".name ];
13 security.acme.certs."${domain}" = {
15 #postRun = "systemctl reload freeciv";
17 systemd.services.freeciv = {
18 wants = [ "acme-selfsigned-${domain}.service" "acme-${domain}.service"];
19 after = [ "acme-selfsigned-${domain}.service" ];
21 services.upnpc.redirections = [
23 externalPort = freeciv.settings.port; protocol = "TCP";
24 service.wantedBy = ["freeciv.service"];
25 service.partOf = ["freeciv.service"];