Add factorio mod zips
This commit is contained in:
@@ -49,6 +49,13 @@ with lib; {
|
||||
options = [ "subvol=@state" "noexec" "noatime" "nodiratime" ];
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
"/var/lib/private" = {
|
||||
device = "/dev/disk/by-label/limina-data";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@var-private" "noexec" "noatime" "nodiratime" ];
|
||||
neededForBoot = true;
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [{ device = "/dev/disk/by-label/limina-swap"; }];
|
||||
|
||||
@@ -76,4 +76,19 @@ in {
|
||||
# Due to rollback, sudo will lecture after every reboot
|
||||
Defaults lecture = never
|
||||
'';
|
||||
|
||||
fudo = {
|
||||
secrets = {
|
||||
secret-group = "fudo-secrets";
|
||||
secret-users = [ "niten" ];
|
||||
secret-paths = [ "/state/secrets" ];
|
||||
};
|
||||
|
||||
minecraft-clj = {
|
||||
enable = true;
|
||||
state-directory = "/state/services/minecraft-clj";
|
||||
admins = [ "fudoniten" ];
|
||||
worlds = { REPLand = { allocated-memory = 16; }; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -45,14 +45,6 @@ in {
|
||||
# document-root = "/state/gemini/root";
|
||||
# # textfiles-archive = "${pkgs.textfiles}";
|
||||
# slynk-port = 4005;
|
||||
|
||||
# # feeds = {
|
||||
# # viator = {
|
||||
# # title = "viator's phlog";
|
||||
# # path = "/home/viator/gemini-public/feed/";
|
||||
# # url = "gemini://informis.land/user/viator/feed/";
|
||||
# # };
|
||||
# # };
|
||||
# };
|
||||
|
||||
fudo = {
|
||||
|
||||
@@ -55,18 +55,18 @@ in {
|
||||
{
|
||||
destination = "10.0.0.10:25565";
|
||||
proto = "tcp";
|
||||
sourcePort = "25565";
|
||||
sourcePort = 25565;
|
||||
}
|
||||
{
|
||||
destination = "10.0.0.10:25565";
|
||||
proto = "udp";
|
||||
sourcePort = "25565";
|
||||
sourcePort = 25565;
|
||||
}
|
||||
# Factorio
|
||||
{
|
||||
destination = "10.0.0.10:34197";
|
||||
proto = "udp";
|
||||
sourcePort = "34197";
|
||||
sourcePort = 34197;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
@@ -99,7 +99,7 @@ in {
|
||||
mattermost-auth-token-file = host-secrets.pricebot-auth-token.target-file;
|
||||
monitors = {
|
||||
btc = {
|
||||
mattermost-channel-id = "3m4bsxcrwbrmpqd4yawwh98q8o";
|
||||
mattermost-channel-id = "f7iem9t3qbbczjyuq4waj1s3ua";
|
||||
notify-user = "niten";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
# gdiw = let
|
||||
# version = "0.17.5";
|
||||
# sha256 = "0kg1jz26gpmldajckb47vgk9v6z6w0sf1lykl2pvjh0nq4mfl252";
|
||||
# in pkgs.stdenv.mkDerivation {
|
||||
# inherit version;
|
||||
# pname = "gdiw";
|
||||
# src = pkgs.fetchurl {
|
||||
# inherit sha256;
|
||||
# url =
|
||||
# "https://github.com/DaCyclops/GDIW/archive/refs/tags/${version}.zip";
|
||||
# };
|
||||
# deps = [ ];
|
||||
# phases = [ "installPhase" ];
|
||||
# installPhase = ''
|
||||
# mkdir $out
|
||||
# cp $src $out/GDIW_${version}.zip
|
||||
# '';
|
||||
# };
|
||||
|
||||
# bottleneck = let
|
||||
# version = "0.11.7";
|
||||
# sha256 = "0mvk0wciqpggjc0vzhb7g0a0cxq0wdzvzwrbqvagr6y02j4h3y1n";
|
||||
# in pkgs.stdenv.mkDerivation {
|
||||
# inherit version;
|
||||
# pname = "bottleneck";
|
||||
# src = pkgs.fetchurl {
|
||||
# inherit sha256;
|
||||
# url =
|
||||
# "https://github.com/troelsbjerre/Bottleneck/archive/refs/tags/${version}.zip";
|
||||
# };
|
||||
# deps = [ ];
|
||||
# phases = [ "installPhase" ];
|
||||
# installPhase = ''
|
||||
# mkdir $out
|
||||
# cp $src $out/Bottleneck_${version}.zip
|
||||
# '';
|
||||
# };
|
||||
|
||||
# even-distribution = let
|
||||
# version = "1.0.10";
|
||||
# commit-hash = "2f65d82a4da606b82bc597fce2695e7c512ebbfe";
|
||||
# sha256 = "05y1j8mq2nm163h014510bkv0w06hn97z5v2kay36ilj0rzdpi6j";
|
||||
# in pkgs.stdenv.mkDerivation {
|
||||
# inherit version;
|
||||
# pname = "even-distribution";
|
||||
|
||||
# src = pkgs.fetchurl {
|
||||
# inherit sha256;
|
||||
# url =
|
||||
# "https://github.com/321freddy/even-distribution/archive/${commit-hash}.zip";
|
||||
# };
|
||||
# deps = [ ];
|
||||
# phases = [ "installPhase" ];
|
||||
# installPhase = ''
|
||||
# mkdir $out
|
||||
# cp $src $out/even-distribution_${version}.zip
|
||||
# '';
|
||||
# };
|
||||
|
||||
# mkPlugin = { name, version, url, sha256, deps ? [ ] }:
|
||||
# let
|
||||
# fetchurl-auth = { name, url, sha256 }:
|
||||
# lib.overrideDerivation (pkgs.fetchurl {
|
||||
# inherit name url sha256;
|
||||
# curlOpts = [
|
||||
# "--get"
|
||||
# "-L"
|
||||
# "-H"
|
||||
# "Accept:application/octet-stream"
|
||||
# "--data-urlencode"
|
||||
# "username@username"
|
||||
# "--data-urlencode"
|
||||
# "token@token"
|
||||
# ];
|
||||
|
||||
# }) (_:
|
||||
# let
|
||||
# username = "Exceeding9987";
|
||||
# token =
|
||||
# lib.readFile config.fudo.secrets.files.blobs."factorio-token.txt";
|
||||
# in {
|
||||
# preHook = if username != "" && token != "" then ''
|
||||
# echo -n "${username}" >username
|
||||
# echo -n "${token}" >token
|
||||
# '' else ''
|
||||
# # Deliberately failing since username/token was not provided, so we can't fetch.
|
||||
# # We can't use builtins.throw since we want the result to be used if the tar is in the store already.
|
||||
# exit 1
|
||||
# '';
|
||||
# });
|
||||
# in pkgs.stdenv.mkDerivation {
|
||||
# inherit version deps;
|
||||
# pname = name;
|
||||
# src = fetchurl-auth { inherit name url sha256; };
|
||||
# phases = [ "installPhase" ];
|
||||
# installPhase = ''
|
||||
# mkdir $out
|
||||
# cp $src $out/${name}_${version}.zip
|
||||
# '';
|
||||
# };
|
||||
|
||||
mods = let
|
||||
modFromFile = file:
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = baseNameOf file;
|
||||
src = file;
|
||||
phases = [ "installPhase" ];
|
||||
installPhase = "cp $src $out";
|
||||
};
|
||||
modzip = filename: modFromFile (../../../static/factorio + "/${filename}");
|
||||
in {
|
||||
advanced-autonomous-industries = modzip "aai-industry_0.5.19.zip";
|
||||
alien-biomes = modzip "alien-biomes_0.6.7.zip";
|
||||
aircraft = modzip "Aircraft_1.8.4.zip";
|
||||
armored-biters = modzip "ArmoredBiters_1.1.6.zip";
|
||||
bobs-enemies = modzip "bobenemies_1.1.5.zip";
|
||||
bottleneck = modzip "Bottleneck_0.11.7.zip";
|
||||
bullet-trails = modzip "bullet-trails_0.6.2.zip";
|
||||
even-distribution = modzip "even-distribution_1.0.10.zip";
|
||||
flow-control = modzip "Flow Control_3.1.3.zip";
|
||||
fluid-must-flow = modzip "FluidMustFlow_1.3.1.zip";
|
||||
gdiw = modzip "GDIW_0.17.5.zip";
|
||||
hovercrafts = modzip "Hovercrafts_1.2.2.zip";
|
||||
industrial-revolution-2 = modzip "IndustrialRevolution_2.3.2.zip";
|
||||
krastorio2 = modzip "Krastorio2_1.3.6.zip";
|
||||
larger-lamps = modzip "DeadlockLargerLamp_1.5.0.zip";
|
||||
miniloader = modzip "miniloader_1.15.6.zip";
|
||||
planet-imaging-satellite = modzip "planetImagingSatellite_1.0.3.zip";
|
||||
rampant = modzip "Rampant_3.1.2.zip";
|
||||
recipe-book = modzip "RecipeBook_3.4.5.zip";
|
||||
space-exploration = modzip "space-exploration_0.6.89.zip";
|
||||
stackers = modzip "deadlock-beltboxes-loaders_2.4.2.zip";
|
||||
trees = modzip "trees_4.5.1.zip";
|
||||
vehicle-snap = modzip "VehicleSnap_1.18.4.zip";
|
||||
};
|
||||
|
||||
in {
|
||||
config.services.factorio = {
|
||||
enable = true;
|
||||
public = false;
|
||||
port = 34197;
|
||||
lan = false;
|
||||
game-name = "Fudo Factorio";
|
||||
description = "Fudo Factorio Server";
|
||||
admins = [ "fudoniten" "arkayuu" ];
|
||||
openFirewall = true;
|
||||
autosave-interval = 10;
|
||||
loadLatestSave = true;
|
||||
package = pkgs.factorio-headless-experimental;
|
||||
# mods = [ bottleneck gdiw ];
|
||||
mods = with mods; [ bottleneck gdiw ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
config.fudo.minecraft-server = {
|
||||
enable = true;
|
||||
package = pkgs.minecraft-current;
|
||||
data-dir = "/state/minecraft/data";
|
||||
world-name = "selbyland";
|
||||
game-mode = "creative";
|
||||
difficulty = 0;
|
||||
allow-cheats = true;
|
||||
allocated-memory = 14;
|
||||
};
|
||||
}
|
||||
@@ -154,13 +154,13 @@ in {
|
||||
|
||||
logging.loki.state-directory = "/state/services/loki";
|
||||
|
||||
selby-forum = {
|
||||
enable = true;
|
||||
state-directory = "/state/services/selby-forum";
|
||||
legacy-forum-data = files.blobs."selby-forum-2021-12-14.clean";
|
||||
external-interface = "extif0";
|
||||
mail.host = "mail.fudo.org";
|
||||
};
|
||||
# selby-forum = {
|
||||
# enable = true;
|
||||
# state-directory = "/state/services/selby-forum";
|
||||
# legacy-forum-data = files.blobs."selby-forum-2021-12-14.clean";
|
||||
# external-interface = "extif0";
|
||||
# mail.host = "mail.fudo.org";
|
||||
# };
|
||||
};
|
||||
|
||||
# dns.state-directory = "/state/nsd";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
with lib; {
|
||||
fudo = {
|
||||
slynk.enable = true;
|
||||
wallfly.location = "office";
|
||||
|
||||
@@ -8,8 +8,6 @@ in {
|
||||
wallfly.location = "office";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ opencv-java ];
|
||||
|
||||
networking = {
|
||||
interfaces.intif0.useDHCP = true;
|
||||
firewall.enable = false;
|
||||
|
||||
@@ -8,8 +8,6 @@ in {
|
||||
wallfly.location = "family_room";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ opencv-java ];
|
||||
|
||||
networking = {
|
||||
interfaces.intif0.useDHCP = true;
|
||||
firewall.enable = false;
|
||||
|
||||
@@ -88,4 +88,13 @@ in {
|
||||
services.flatpak.enable = enable-gui;
|
||||
|
||||
fonts.fontDir.enable = enable-gui;
|
||||
|
||||
# Stupid hack
|
||||
home-manager.users.jasper.home.packages = let
|
||||
factorio = pkgs.factorio.override {
|
||||
username = "Exceeding9987";
|
||||
token = lib.removeSuffix "\n"
|
||||
(readFile config.fudo.secrets.files.blobs."factorio-token.txt");
|
||||
};
|
||||
in [ factorio ];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user