From d104278ad1f2fedbd590280b48574f9f7b2a2413 Mon Sep 17 00:00:00 2001 From: Chandler Swift Date: Thu, 31 Oct 2024 02:04:15 -0500 Subject: [PATCH] Add Factorio Server --- bert/configuration.nix | 1 + bert/services/factorio.nix | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 bert/services/factorio.nix diff --git a/bert/configuration.nix b/bert/configuration.nix index b175a80..1e09172 100644 --- a/bert/configuration.nix +++ b/bert/configuration.nix @@ -4,6 +4,7 @@ imports = [ ./hardware-configuration.nix + ./services/factorio.nix ./services/http/index.nix ./services/monitoring.nix ]; diff --git a/bert/services/factorio.nix b/bert/services/factorio.nix new file mode 100644 index 0000000..10e0b27 --- /dev/null +++ b/bert/services/factorio.nix @@ -0,0 +1,17 @@ +{ + # nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ + # "factorio-headless" + # ]; + services.factorio = let + factorio-nixpkgs = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/7e35ac30ea1d236419653182559367ecd8a30675.tar.gz") { + config.allowUnfree = true; + }; + in { + enable = true; + package = factorio-nixpkgs.factorio-headless; + openFirewall = true; + nonBlockingSaving = true; + game-name = "Chandler's Factorio Server"; + description = "Job 28:2"; + }; +}