From 16ca8d5bac13300d67b482cbf0fde8ef9caf2f30 Mon Sep 17 00:00:00 2001 From: Gabriella Bere Date: Fri, 13 Sep 2024 15:14:45 +0100 Subject: [PATCH] added satisfactory server to flake --- flake.lock | 43 ++++++++++++++++++++++++++++ flake.nix | 1 + hosts/gabbielaptop/configuration.nix | 3 +- modules/satisfactory-server.nix | 8 ++++++ 4 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 modules/satisfactory-server.nix diff --git a/flake.lock b/flake.lock index d0b2053..092cb02 100644 --- a/flake.lock +++ b/flake.lock @@ -361,9 +361,31 @@ "home-manager": "home-manager", "nixpkgs": "nixpkgs_2", "nixvim": "nixvim", + "satisfactory-server": "satisfactory-server", "stablepkgs": "stablepkgs" } }, + "satisfactory-server": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "steam-fetcher": "steam-fetcher" + }, + "locked": { + "lastModified": 1725982284, + "narHash": "sha256-j4YSMeRFW5RgHHQz4lrCPpDjaVmiH2s1fBvNscVVULk=", + "owner": "nekowinston", + "repo": "satisfactory-server-flake", + "rev": "69823687f0e16932c8ca5730b5265aed50af7463", + "type": "github" + }, + "original": { + "owner": "nekowinston", + "repo": "satisfactory-server-flake", + "type": "github" + } + }, "stablepkgs": { "locked": { "lastModified": 1725001927, @@ -380,6 +402,27 @@ "type": "github" } }, + "steam-fetcher": { + "inputs": { + "nixpkgs": [ + "satisfactory-server", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1714795926, + "narHash": "sha256-PkgC9jqoN6cJ8XYzTA2PlrWs7aPJkM3BGiTxNqax0cA=", + "owner": "nix-community", + "repo": "steam-fetcher", + "rev": "12f66eafb7862d91b3e30c14035f96a21941bd9c", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "steam-fetcher", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1689347949, diff --git a/flake.nix b/flake.nix index e073c16..c6d3793 100644 --- a/flake.nix +++ b/flake.nix @@ -64,6 +64,7 @@ inputs.disko.nixosModules.disko inputs.satisfactory-server.nixosModules.satisfactory ./hosts/biggerpi/configuration.nix + ./modules/satisfactory-server.nix ]; }; diff --git a/hosts/gabbielaptop/configuration.nix b/hosts/gabbielaptop/configuration.nix index 3098f7f..7fe3463 100644 --- a/hosts/gabbielaptop/configuration.nix +++ b/hosts/gabbielaptop/configuration.nix @@ -192,8 +192,9 @@ networking.firewall.allowedTCPPorts = [ 43391 # used to forward minecraft traffic to minecraft.gabbie.blue:33991 4455 # used for OBS websocket + 7777 # used for Satisfactory Server ]; - # networking.firewall.allowedUDPPorts = [ ... ]; + networking.firewall.allowedUDPPorts = [ 7777 ]; # networking.firewall.allowedTCPPortRanges = [ # { # from = 49000; diff --git a/modules/satisfactory-server.nix b/modules/satisfactory-server.nix new file mode 100644 index 0000000..ec51ae9 --- /dev/null +++ b/modules/satisfactory-server.nix @@ -0,0 +1,8 @@ +{ config, pkgs, ... }: { + + services.satisfactory = { + enable = true; + openFirewall = true; + }; + +}