From d95b74e84eb4e71c2481ecacc309c119b8a2c447 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Fri, 15 Mar 2024 06:45:41 +0100 Subject: agame: init --- modules/agame/default.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 modules/agame/default.nix (limited to 'modules') diff --git a/modules/agame/default.nix b/modules/agame/default.nix new file mode 100644 index 0000000..0a8657d --- /dev/null +++ b/modules/agame/default.nix @@ -0,0 +1,13 @@ +{ config, lib, pkgs, ... }: +let cfg = config.services.agame; in +{ + options.services.agame.enable = lib.mkEnableOption "agame server"; + + config = lib.mkIf cfg.enable { + environment.systemPackages = [ pkgs.agame ]; + networking.firewall.allowedUDPPorts = [ 16384 ]; + systemd.services.agame.after = [ "network.target" ]; + systemd.services.agame.script = "${pkgs.agame}/bin/agame --server"; + systemd.services.agame.wantedBy = [ "multi-user.target" ]; + }; +} -- cgit v1.2.3