From 99bb1e74c73494a0a2f21e6b074f2f3c3e908123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Wed, 30 Oct 2024 01:44:43 -0300 Subject: [PATCH] phantom: add factorio server --- hosts/phantom/default.nix | 1 + hosts/phantom/factorio-server.nix | 24 ++++++++++++++++++++++++ secrets/phantom-factorio-settings.age | Bin 0 -> 847 bytes secrets/secrets.nix | 1 + 4 files changed, 26 insertions(+) create mode 100644 hosts/phantom/factorio-server.nix create mode 100644 secrets/phantom-factorio-settings.age 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 0000000000000000000000000000000000000000..77eb8bddbb17ce598bbd018de5232c281bc213e4 GIT binary patch literal 847 zcmV~$U5MKR007|0@HV4!!q81cIDB%8U6MAvw5JT4OLA@6q;1lsxx%Swn&z+h{}02L zp-vq>_~H*bVUtaTaZ@G?A0~q6ft)(gc~6RR>ci%aahwR=(C?E}rJ&fdpShv#*hd{- zg<=FK9GeXSt>6dJES@B3T?Kj}O0XcAwjkZbxz1Q}@tku^J4Ss^N9LSL-pa9tOJ%4y z=Y?k6wrJY4n*r~J5fwNJ;P$-=l1Jv!gjM=fC%3dEy*%pEkVea>$hQVc5mhZ=Or&9( zD=*cgY0HhWB%?V7cPI!0uz=5PvyV!4HVWG9af_N_U@sq8Z73opG-k18U7;*3=F(w1 z*6i^hLs1r~kd`kL(}gyW#~KU{JXvJms^9TKj+n!9%dC|aXn2IW#(?ZhV58LnBY4W% z2E)_1D%5QRjSaKxJ2c?oqVGdvLTWHs#E5KFsJO7`+sQC#!iEJ$6|pnmihOgjnCE2C zNF{Knc_d8i5WJS zIVZ_LZ&H!?3f75%GE+g21yT-@M$)#6jfoc;VtuTdEJVN9fv9A!gw8Qb_{U= z#3pVpP*Rl{a$*$#3WdUKwccRmT1G>pgvhlf;fFLMqA}BBDQJ{&-G;_?10hv~5(-?} zxraP=`J6RBzqLm^bMO%(y#2w+XE*Pi{d<$Rh4j|{*nOz=hh75X!&6KnIoVE6qtb7kw`Ycuzo>z^FIL|)imPmNu-w9l?Q zq3pc*fPL&RU@||yx6R$Yd-;U((gptFb6fO*hd)IdUtQd_hyVVcz1I!m@$HA!UwQso s@rN6GKf3wthZwc-`ZN2^{P*YkSDB43&W}HTjCl9*`LpinlkAuA|6;;I-v9sr literal 0 HcmV?d00001 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 ];