added factorio
This commit is contained in:
parent
37b08d943b
commit
70ebb4de20
8 changed files with 138 additions and 19 deletions
31
modules/game/server/factorio.nix
Normal file
31
modules/game/server/factorio.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{pkgs, ...}: {
|
||||
# Also enable non-free packages or else the factorio download will fail:
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
factorio-headless
|
||||
];
|
||||
|
||||
services.factorio = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
#mods =
|
||||
# let
|
||||
# inherit (pkgs) lib;
|
||||
# modDir = /opt/factorio-mods;
|
||||
# modList = lib.pipe modDir [
|
||||
# builtins.readDir
|
||||
# (lib.filterAttrs (k: v: v == "regular"))
|
||||
# (lib.mapAttrsToList (k: v: k))
|
||||
# (builtins.filter (lib.hasSuffix ".zip"))
|
||||
# ];
|
||||
# modToDrv = modFileName:
|
||||
# pkgs.runCommand "copy-factorio-mods" {} ''
|
||||
# mkdir $out
|
||||
# cp ${modDir + "/${modFileName}"} $out/${modFileName}
|
||||
# ''
|
||||
# // { deps = []; };
|
||||
# in
|
||||
# builtins.map modToDrv modList;
|
||||
};
|
||||
}
|
|
@ -1,26 +1,16 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.systemd-boot.configurationLimit = 20;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "crocoite"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
{...}: {
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
|
||||
#i18n.supportedLocales = [
|
||||
# "en_GB.UTF-8"
|
||||
# "en_US.UTF-8"
|
||||
# "de_DE.UTF-8"
|
||||
#];
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
Loading…
Add table
Add a link
Reference in a new issue