Skip to content

Commit

Permalink
docs: add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
nekowinston committed Sep 7, 2024
1 parent ab2c751 commit b2d20db
Show file tree
Hide file tree
Showing 4 changed files with 212 additions and 4 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Satisfactory Dedicated Server for NixOS

See [`./docs/nixos-options.md`](./docs/nixos-options.md).
168 changes: 168 additions & 0 deletions docs/nixos-options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
## services\.satisfactory\.enable



Whether to enable Satisfactory Dedicated Server\.



*Type:*
boolean



*Default:*
` false `



*Example:*
` true `



## services\.satisfactory\.package



The satisfactory-server package to use\.



*Type:*
package



*Default:*
` pkgs.satisfactory-server `



## services\.satisfactory\.beaconPort

Override the Beacon Port the server uses\. As of Update 6, this port can be set freely\.
If this port is already in use, the server will step up to the next port until an available one is found\.



*Type:*
16 bit unsigned integer; between 0 and 65535 (both inclusive)



*Default:*
` 15000 `



## services\.satisfactory\.listenAddress



Bind the server process to a specific IP address rather than all available interfaces\.



*Type:*
string



*Default:*
` "0.0.0.0" `



## services\.satisfactory\.openFirewall



Whether to open the ports in the firewall\.



*Type:*
boolean



*Default:*
` false `



## services\.satisfactory\.port



Override the Game Port the server uses\.
This is the primary port used to communicate game telemetry with the client\.
If it is already in use, the server will step up to the next port until an available one is found\.



*Type:*
16 bit unsigned integer; between 0 and 65535 (both inclusive)



*Default:*
` 7777 `



## services\.satisfactory\.serverQueryPort



Override the Query Port the server uses\.
This is the port specified in the Server Manager in the client UI to establish a server connection\.



*Type:*
16 bit unsigned integer; between 0 and 65535 (both inclusive)



*Default:*
` 15777 `



## services\.satisfactory\.stateDir



Directory to store the server state\.



*Type:*
path



*Default:*
` "/var/lib/satisfactory" `



## services\.satisfactory\.user



User to run the server as\.



*Type:*
string



*Default:*
` "satisfactory" `


17 changes: 13 additions & 4 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,18 @@
satisfactory-server-unwrapped = final.callPackage ./pkgs/satisfactory-server { };
};

packages = forAllSystems (system: {
inherit (pkgsFor system) satisfactory-server satisfactory-server-fhs;
default = (pkgsFor system).satisfactory-server;
});
packages = forAllSystems (
system:
let
pkgs = pkgsFor system;
version = self.shortRev or self.dirtyShortRev;
mkOptionDoc = args: (pkgs.callPackage ./pkgs/docs.nix { }) (args // { inherit version; });
in
{
inherit (pkgs) satisfactory-server satisfactory-server-fhs;
default = pkgs.satisfactory-server;
docs = mkOptionDoc { modules = [ self.nixosModules.satisfactory ]; };
}
);
};
}
28 changes: 28 additions & 0 deletions pkgs/docs.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{ lib, nixosOptionsDoc }:
{ modules, version }:
let
eval = lib.evalModules {
modules = modules ++ [
{
config = {
_module.check = false;
};
}
];
};

doc = nixosOptionsDoc {
options = lib.filterAttrs (
n:
lib.const (
!(lib.elem n [
"_module"
"system"
])
)
) eval.options;
documentType = "none";
revision = version;
};
in
doc.optionsCommonMark

0 comments on commit b2d20db

Please sign in to comment.