factorio server
Some checks failed
/ build (push) Failing after 3h0m4s
/ lint (push) Failing after 8s

This commit is contained in:
Jana Dönszelmann 2025-09-27 21:40:07 +02:00
parent 00b7254d12
commit 47a4f3f9a7
No known key found for this signature in database
10 changed files with 174 additions and 52 deletions

View file

@ -1,9 +1,9 @@
{ flakes, ... }:
{ config
, flakes
, pkgs
, ...
}:
{
# imports = [
# flakes.mapf.nixosModules.default
# ];
sops.secrets.mapf = {
sopsFile = ../../../secrets/mapf-prod.env;
};
@ -20,11 +20,30 @@
};
};
# donsz.services.mapf = {
# enable = true;
# envfile = "/run/secrets/sops/mapf";
# db_name = "mapfprod";
# db_user = "mapfprod";
# db_password = "";
# };
systemd.services.mapf-server =
let
package = flakes.mapf.packages.${pkgs.system}.default;
in
{
description = "mapf-server";
wantedBy = [ "multi-user.target" ];
serviceConfig = {
DynamicUser = "yes";
ExecStart = "${package}/mapf_server_bin";
Restart = "on-failure";
RestartSec = "5s";
EnvironmentFile = config.sops.secrets.mapf.path;
WorkingDirectory = "${package}";
};
environment = {
MAPF_TEMPLATEFOLDER = "${package}/templates";
MAPF_DBUSER = "mapfprod";
MAPF_DBPASSWORD = "";
MAPF_DBPORT = "3306";
MAPF_DBHOST = "localhost";
MAPF_DBDATABASE = "mapfprod";
};
};
}