From 191a11bde943194e425d852c340fe9b8efb3692b Mon Sep 17 00:00:00 2001 From: Lgmrszd Date: Fri, 29 Nov 2024 10:34:34 +0400 Subject: [PATCH] vps: override factorio version --- hosts/vps1/services/factorio-versions.json | 18 ++++++++++++++++++ hosts/vps1/services/factorio.nix | 7 ++++--- 2 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 hosts/vps1/services/factorio-versions.json diff --git a/hosts/vps1/services/factorio-versions.json b/hosts/vps1/services/factorio-versions.json new file mode 100644 index 0000000..85e61c0 --- /dev/null +++ b/hosts/vps1/services/factorio-versions.json @@ -0,0 +1,18 @@ +{ + "x86_64-linux": { + "headless": { + "stable": { + "candidateHashFilenames": [ + "factorio-headless_linux_2.0.21.tar.xz", + "factorio_headless_x64_2.0.21.tar.xz" + ], + "name": "factorio_headless_x64-2.0.21.tar.xz", + "needsAuth": false, + "sha256": "1d6d2785006d6a8d9d5fdcdaa7097a189ec35ba95f3521025dc4e046f7a1398e", + "tarDirectory": "x64", + "url": "https://factorio.com/get-download/2.0.21/headless/linux64", + "version": "2.0.21" + } + } + } +} diff --git a/hosts/vps1/services/factorio.nix b/hosts/vps1/services/factorio.nix index 68945e1..08bd348 100644 --- a/hosts/vps1/services/factorio.nix +++ b/hosts/vps1/services/factorio.nix @@ -1,14 +1,15 @@ -{ config, data, ...}: +{ config, data, pkgs, ...}: { services.factorio = { enable = true; + package = (pkgs.factorio-headless.override { versionsJson = ./factorio-versions.json; }); public = false; game-name = "Lgm's Factorio Game"; openFirewall = true; autosave-interval = 5; extraSettings = { - autosave-slots = 8; + autosave_slots = 8; }; extraSettingsFile = "/var/lib/${config.services.factorio.stateDirName}/server-settings-extra.json"; }; -} \ No newline at end of file +}