factorio: Attempt at making the server work
This commit is contained in:
parent
30c39a058c
commit
9c06295dd1
8 changed files with 97 additions and 9 deletions
|
@ -13,8 +13,8 @@ inputs: {
|
|||
factorio = {
|
||||
config = import ./factorio/configuration.nix inputs;
|
||||
deploy = {
|
||||
host = "10.0.0.82";
|
||||
# host = "factorio.barn-beaver.ts.net";
|
||||
# host = "10.0.0.82";
|
||||
host = "factorio.barn-beaver.ts.net";
|
||||
targetUser = "erwin";
|
||||
tags = [ "container" ];
|
||||
};
|
||||
|
|
|
@ -50,9 +50,6 @@
|
|||
|
||||
systemd = {
|
||||
services = {
|
||||
factorio.serviceConfig = {
|
||||
User = "factorio";
|
||||
};
|
||||
logrotate-checkconf.enable = false;
|
||||
};
|
||||
|
||||
|
@ -89,10 +86,10 @@
|
|||
|
||||
sops.defaultSopsFile = ./secrets.yaml;
|
||||
sops.secrets = {
|
||||
factorio-config = {
|
||||
owner = "factorio";
|
||||
group = "factorio";
|
||||
};
|
||||
# factorio-config = {
|
||||
# owner = "factorio";
|
||||
# group = "factorio";
|
||||
# };
|
||||
};
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
|
|
|
@ -24,6 +24,15 @@ let
|
|||
// {
|
||||
deps = [ ];
|
||||
};
|
||||
|
||||
disableSpaceAge = pkgs.writeShellScript "disable-space-age" ''
|
||||
space_age_mods=("elevated-rails" "quality" "space-age")
|
||||
|
||||
for mod in "''${space_age_mods[@]}"; do
|
||||
${lib.getExe pkgs.jaq} --arg mod_name "''${mod}" 'if .mods | map(.name) | index($mod_name) then .mods |= map(if .name == $mod_name and .enabled == true then .enabled = false else . end) else .mods += [{"name": $mod_name, "enabled": false}] end' /var/lib/factorio/mod-list.json > /var/lib/factorio/mod-list.json.tmp
|
||||
mv /var/lib/factorio/mod-list.json.tmp /var/lib/factorio/mod-list.json
|
||||
done
|
||||
'';
|
||||
in
|
||||
{
|
||||
services = {
|
||||
|
@ -32,10 +41,22 @@ in
|
|||
game-name = "stats-export-test";
|
||||
saveName = "stats-export-test";
|
||||
mods = builtins.map modToDrv modList;
|
||||
mods-dat = ./mods/mod-settings.dat;
|
||||
lan = true;
|
||||
admins = [ "eboskma" ];
|
||||
nonBlockingSaving = true;
|
||||
requireUserVerification = false;
|
||||
};
|
||||
};
|
||||
|
||||
systemd = {
|
||||
services = {
|
||||
factorio.serviceConfig = {
|
||||
User = "factorio";
|
||||
ExecStartPre = [
|
||||
disableSpaceAge
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
70
machines/factorio/mods/mod-list.json
Normal file
70
machines/factorio/mods/mod-list.json
Normal file
|
@ -0,0 +1,70 @@
|
|||
{
|
||||
"mods":
|
||||
[
|
||||
|
||||
{
|
||||
"name": "base",
|
||||
"enabled": true
|
||||
},
|
||||
|
||||
{
|
||||
"name": "elevated-rails",
|
||||
"enabled": false
|
||||
},
|
||||
|
||||
{
|
||||
"name": "quality",
|
||||
"enabled": false
|
||||
},
|
||||
|
||||
{
|
||||
"name": "space-age",
|
||||
"enabled": false
|
||||
},
|
||||
|
||||
{
|
||||
"name": "calculator-ui",
|
||||
"enabled": true
|
||||
},
|
||||
|
||||
{
|
||||
"name": "car-finder",
|
||||
"enabled": true
|
||||
},
|
||||
|
||||
{
|
||||
"name": "even-distribution",
|
||||
"enabled": true
|
||||
},
|
||||
|
||||
{
|
||||
"name": "flib",
|
||||
"enabled": true
|
||||
},
|
||||
|
||||
{
|
||||
"name": "OrePatchOrganizer",
|
||||
"enabled": true
|
||||
},
|
||||
|
||||
{
|
||||
"name": "power-grid-comb",
|
||||
"enabled": true
|
||||
},
|
||||
|
||||
{
|
||||
"name": "RateCalculator",
|
||||
"enabled": true
|
||||
},
|
||||
|
||||
{
|
||||
"name": "squeak-through-2",
|
||||
"enabled": true
|
||||
},
|
||||
|
||||
{
|
||||
"name": "VehicleSnap",
|
||||
"enabled": true
|
||||
}
|
||||
]
|
||||
}
|
BIN
machines/factorio/mods/mod-settings.dat
Normal file
BIN
machines/factorio/mods/mod-settings.dat
Normal file
Binary file not shown.
Loading…
Reference in a new issue