add factorio to chonk, update wireguard config
This commit is contained in:
parent
a6376572c1
commit
8a270f07ed
|
@ -32,8 +32,8 @@
|
||||||
services.openssh.ports = [2222];
|
services.openssh.ports = [2222];
|
||||||
|
|
||||||
networking.nat.enable = true;
|
networking.nat.enable = true;
|
||||||
networking.nat.internalIPs = ["10.10.42.0/24"];
|
networking.nat.internalIPs = ["10.10.42.0/24" "10.0.1.1"];
|
||||||
networking.nat.externalInterface = "eno1";
|
networking.nat.externalInterface = "br0";
|
||||||
|
|
||||||
networking.firewall.enable = lib.mkForce true;
|
networking.firewall.enable = lib.mkForce true;
|
||||||
networking.firewall.allowedTCPPorts = [80 443 2222];
|
networking.firewall.allowedTCPPorts = [80 443 2222];
|
||||||
|
|
|
@ -1,17 +1,55 @@
|
||||||
{
|
{
|
||||||
self,
|
self,
|
||||||
|
lib,
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
fetchurl,
|
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
#far-reach = pkgs.factorio-utils.modDrv rec {
|
with pkgs; let
|
||||||
# src = fetchurl {
|
modDrv = pkgs.factorio-utils.modDrv {
|
||||||
# urls = [ "https://dl-mod.factorio.com/download/c48a8fbbe6941453173ae4e8a353976f3d757773/far-reach_1.1.2.zip?secure=0rFEz6-kw9j2JtrOUv3yEw,1677274141" ];
|
allRecommendedMods = true;
|
||||||
# sha256 = "";
|
allOptionalMods = false;
|
||||||
# };
|
};
|
||||||
#};
|
|
||||||
in {
|
flib = modDrv {
|
||||||
|
src = fetchurl {
|
||||||
|
urls = [
|
||||||
|
"https://cloud.pub.solar/s/EsrBq2XpR9bTp7b/download/flib_0.12.6.zip"
|
||||||
|
];
|
||||||
|
sha256 = "Wf/w3Bh4jT5DDEp6GCVdg181DxEjiWe1iN3h5X7/oAw=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
electricalTrains = modDrv {
|
||||||
|
src = fetchurl {
|
||||||
|
urls = [
|
||||||
|
"https://cloud.pub.solar/s/oHXWpoi7kD52Dzt/download/Realistic_Electric_Trains_Krastorio_2_1.0.0.zip"
|
||||||
|
];
|
||||||
|
sha256 = "ujO5qRHzKgxX/vsYYvoBjh1UKukGD31FvjLQZzCqxlk=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
krastorio2Assets = modDrv {
|
||||||
|
src = fetchurl {
|
||||||
|
urls = [
|
||||||
|
"https://cloud.pub.solar/s/czsmnaiis25TX8m/download/Krastorio2Assets_1.2.1.zip"
|
||||||
|
];
|
||||||
|
sha256 = "1Y8I40I8EQLdLuiWDr+aty8p7PNh1pY6IPkRVz2pi5E=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
krastorio2 = modDrv {
|
||||||
|
src = fetchurl {
|
||||||
|
urls = [
|
||||||
|
"https://cloud.pub.solar/s/DepN4zWWjiEJpZt/download/Krastorio2_1.3.18.zip"
|
||||||
|
];
|
||||||
|
sha256 = "wuMVVW7SbDdBxcUmJLT9MzpC9W1RRJaTs2cYylt6ilU=";
|
||||||
|
};
|
||||||
|
|
||||||
|
deps = [flib krastorio2Assets];
|
||||||
|
};
|
||||||
|
in rec
|
||||||
|
{
|
||||||
services.factorio = {
|
services.factorio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.factorio-headless-experimental;
|
package = pkgs.factorio-headless-experimental;
|
||||||
|
@ -19,6 +57,6 @@ in {
|
||||||
game-name = "pub.solar Factorio";
|
game-name = "pub.solar Factorio";
|
||||||
game-password = "pub.solar";
|
game-password = "pub.solar";
|
||||||
admins = ["hensoko"];
|
admins = ["hensoko"];
|
||||||
#mods = [ far-reach ];
|
mods = [electricalTrains krastorio2];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,25 +11,25 @@
|
||||||
|
|
||||||
# Enable WireGuard
|
# Enable WireGuard
|
||||||
networking.wireguard.interfaces = {
|
networking.wireguard.interfaces = {
|
||||||
wg1 = {
|
wg0 = {
|
||||||
# Determines the IP address and subnet of the client's end of the tunnel interface.
|
|
||||||
ips = ["10.0.1.6"];
|
ips = ["10.0.1.6"];
|
||||||
listenPort = 51899; # to match firewall allowedUDPPorts (without this wg uses random port numbers)
|
listenPort = 51899;
|
||||||
|
|
||||||
# Path to the private key file.
|
|
||||||
#
|
|
||||||
# Note: The private key can also be included inline via the privateKey option,
|
|
||||||
# but this makes the private key world-readable; thus, using privateKeyFile is
|
|
||||||
# recommended.
|
|
||||||
privateKeyFile = "/run/agenix/home_controller_wireguard";
|
privateKeyFile = "/run/agenix/home_controller_wireguard";
|
||||||
|
|
||||||
peers = [
|
peers = [
|
||||||
|
{
|
||||||
|
# router
|
||||||
|
publicKey = "xqifcPfCgLNQ1M3w6zfoWVMkkz2lO5GZ/LlOECnPQFc=";
|
||||||
|
allowedIPs = ["10.0.1.1/32"];
|
||||||
|
|
||||||
|
persistentKeepalive = 25;
|
||||||
|
}
|
||||||
{
|
{
|
||||||
# giggles
|
# giggles
|
||||||
publicKey = "i5kiTSPGR2jrdHl+s/S6D0YWb+xkbPudczG2RWmWwCg=";
|
publicKey = "i5kiTSPGR2jrdHl+s/S6D0YWb+xkbPudczG2RWmWwCg=";
|
||||||
allowedIPs = ["10.0.1.11/32"];
|
allowedIPs = ["10.0.1.11/32"];
|
||||||
|
|
||||||
# Send keepalives every 25 seconds. Important to keep NAT tables alive.
|
|
||||||
persistentKeepalive = 25;
|
persistentKeepalive = 25;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
@ -37,7 +37,6 @@
|
||||||
publicKey = "VogQYYYNdXLhPKY9/P2WAn6gfEX9ojN3VD+DKx4gl0k=";
|
publicKey = "VogQYYYNdXLhPKY9/P2WAn6gfEX9ojN3VD+DKx4gl0k=";
|
||||||
allowedIPs = ["10.0.1.12/32"];
|
allowedIPs = ["10.0.1.12/32"];
|
||||||
|
|
||||||
# Send keepalives every 25 seconds. Important to keep NAT tables alive.
|
|
||||||
persistentKeepalive = 25;
|
persistentKeepalive = 25;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
@ -45,7 +44,6 @@
|
||||||
publicKey = "7EUcSUckw/eLiWFHD+AzfcoKWstjr+cL70SupOJ6zC0=";
|
publicKey = "7EUcSUckw/eLiWFHD+AzfcoKWstjr+cL70SupOJ6zC0=";
|
||||||
allowedIPs = ["10.0.1.13/32"];
|
allowedIPs = ["10.0.1.13/32"];
|
||||||
|
|
||||||
# Send keepalives every 25 seconds. Important to keep NAT tables alive.
|
|
||||||
persistentKeepalive = 25;
|
persistentKeepalive = 25;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
@ -53,7 +51,6 @@
|
||||||
publicKey = "FRNg+bJWPn4vAA2Fw8PXYsTpxdEKdVE+b7eTtl8ORxM=";
|
publicKey = "FRNg+bJWPn4vAA2Fw8PXYsTpxdEKdVE+b7eTtl8ORxM=";
|
||||||
allowedIPs = ["10.0.1.121/32"];
|
allowedIPs = ["10.0.1.121/32"];
|
||||||
|
|
||||||
# Send keepalives every 25 seconds. Important to keep NAT tables alive.
|
|
||||||
persistentKeepalive = 25;
|
persistentKeepalive = 25;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
@ -61,7 +58,6 @@
|
||||||
publicKey = "sC0wWHE/tvNaVYX3QQTHQUmSTTjZMOjkQ5x/qy6qjTc=";
|
publicKey = "sC0wWHE/tvNaVYX3QQTHQUmSTTjZMOjkQ5x/qy6qjTc=";
|
||||||
allowedIPs = ["10.0.1.254/32"];
|
allowedIPs = ["10.0.1.254/32"];
|
||||||
|
|
||||||
# Send keepalives every 25 seconds. Important to keep NAT tables alive.
|
|
||||||
persistentKeepalive = 25;
|
persistentKeepalive = 25;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue