diff --git a/hosts/phantom/default.nix b/hosts/phantom/default.nix index e5570ee..6a246e4 100644 --- a/hosts/phantom/default.nix +++ b/hosts/phantom/default.nix @@ -21,6 +21,7 @@ ./invidious.nix ./davi.nix ./goofs.nix + ./factorio-server.nix ]; networking.hostName = "phantom"; diff --git a/hosts/phantom/factorio-server.nix b/hosts/phantom/factorio-server.nix new file mode 100644 index 0000000..a4b13b5 --- /dev/null +++ b/hosts/phantom/factorio-server.nix @@ -0,0 +1,24 @@ +{ config, pkgs, ... }: +{ + services.factorio = { + enable = true; + package = pkgs.unstable.factorio-headless.overrideAttrs (_: rec { + version = "2.0.12"; + src = pkgs.fetchurl { + name = "factorio_headless_x64-${version}.tar.xz"; + url = "https://www.factorio.com/get-download/${version}/headless/linux64"; + hash = "sha256-0vgg5eJ6ZEFO0TUixNsByCs8YyPGOArgqnXbT5RIjTE="; + }; + }); + public = true; + lan = true; + openFirewall = true; + admins = [ "lelgenio" ]; + extraSettingsFile = config.age.secrets.phantom-factorio-settings.path; + }; + + age.secrets.phantom-factorio-settings = { + file = ../../secrets/phantom-factorio-settings.age; + mode = "777"; + }; +} diff --git a/secrets/phantom-factorio-settings.age b/secrets/phantom-factorio-settings.age new file mode 100644 index 0000000..77eb8bd Binary files /dev/null and b/secrets/phantom-factorio-settings.age differ diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 7b5fdd8..65f495a 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -12,6 +12,7 @@ in "monolith-forgejo-runner-token.age".publicKeys = [ main_ssh_public_key ]; "lelgenio-cachix.age".publicKeys = [ main_ssh_public_key ]; "monolith-nix-serve-privkey.age".publicKeys = [ main_ssh_public_key ]; + "phantom-factorio-settings.age".publicKeys = [ main_ssh_public_key ]; "phantom-nextcloud.age".publicKeys = [ main_ssh_public_key ]; "phantom-writefreely.age".publicKeys = [ main_ssh_public_key ]; "phantom-renawiki.age".publicKeys = [ main_ssh_public_key ];