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}" = {
14 postRun = "systemctl reload freeciv";
16 systemd.services.postgresql = {
17 wants = [ "acme-selfsigned-${domain}.service" "acme-${domain}.service"];
18 after = [ "acme-selfsigned-${domain}.service" ];
20 services.upnpc.redirections = [
21 { port = freeciv.settings.port; protocol = "TCP"; }