Compare commits
2
Commits
krile
..
292d30f330
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
292d30f330 | ||
|
|
9056f6dcdb
|
No files matched your search
Generated
+55
-110
@@ -9,11 +9,11 @@
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1792853286,
|
||||
"narHash": "sha256-l/Oh5k1NQqQuwh4gBF3VcmCF0WGiCT/LqfvY5huhOq4=",
|
||||
"lastModified": 1789138122,
|
||||
"narHash": "sha256-mh+ZiGCtHAo0xIi1yaNjHsftfnlWz9JiYwHCyT16yIE=",
|
||||
"owner": "ezKEa",
|
||||
"repo": "aagl-gtk-on-nix",
|
||||
"rev": "e9a3b8fdb50a7d77a90c02c84e298c286310385b",
|
||||
"rev": "d82d6d6f66caf4b63fb154e62fad83c627874127",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -32,11 +32,11 @@
|
||||
"rust-overlay": "rust-overlay_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1792911802,
|
||||
"narHash": "sha256-GdMiAfj8hRDCqrE2AvQJ3atf0y2XVGFx9/Ptr6qiju0=",
|
||||
"lastModified": 1791702392,
|
||||
"narHash": "sha256-8uWZP3UiJBtYzBzazI18WvlshKYHxPb+8aqm02OxL5M=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "a355f99a17b9dc38fc626b80340646a94ae7f1c9",
|
||||
"revCount": 30,
|
||||
"rev": "ee2a27ad749d6d774e26c2be5de5f3a5ecd4a93f",
|
||||
"revCount": 28,
|
||||
"type": "git",
|
||||
"url": "https://scm.wyattjmiller.com/wymiller/caitsith.git"
|
||||
},
|
||||
@@ -52,11 +52,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1792800221,
|
||||
"narHash": "sha256-53jIZEWNh96irEXhsMZFoNhLJgGSU3nYl1i4wFQHAsU=",
|
||||
"lastModified": 1783744694,
|
||||
"narHash": "sha256-2cp6N3rrwnGYLTx9l6N+NI+kwrCWxvJUbj5WJhvB29A=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "d31953cf55f9027a56e9be938daf5db8c5655663",
|
||||
"rev": "c3e90c89649b07d1a96e4b9dd6cd0d6e44b91a74",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -74,11 +74,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1792737899,
|
||||
"narHash": "sha256-P0/GhewcEQmAbzq3QunNWY2jLJaYH9F6c/5dEM/jQ4M=",
|
||||
"lastModified": 1786845137,
|
||||
"narHash": "sha256-oQFip+v0luP8NIxJzmiW4Wu8bILsbFWom5l0zonl8hQ=",
|
||||
"owner": "LnL7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "bb0b90dbd54e207100de72b5dcbe3188c98a4b69",
|
||||
"rev": "4cff07de74b50e64bdd68cd4e722ab5b6b35ee48",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -136,22 +136,6 @@
|
||||
}
|
||||
},
|
||||
"flake-compat_4": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1747046372,
|
||||
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_5": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1777699697,
|
||||
@@ -283,11 +267,11 @@
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1792644631,
|
||||
"narHash": "sha256-3aILZu5bQ+6khPvGCdIbC7wBFZOgPbpP0TBSL9tf89E=",
|
||||
"lastModified": 1792166485,
|
||||
"narHash": "sha256-TL2RJ56FbBQNi6vsCXAn7QhZECh5DPbvzfiX6v+4r1A=",
|
||||
"owner": "purpleclay",
|
||||
"repo": "go-overlay",
|
||||
"rev": "ff2b494b477eb4349dd40f0564cedab552f9804d",
|
||||
"rev": "5971ffb6c5de960d37f3b85c53cb5a30387cd05a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -306,11 +290,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1792644631,
|
||||
"narHash": "sha256-3aILZu5bQ+6khPvGCdIbC7wBFZOgPbpP0TBSL9tf89E=",
|
||||
"lastModified": 1792166485,
|
||||
"narHash": "sha256-TL2RJ56FbBQNi6vsCXAn7QhZECh5DPbvzfiX6v+4r1A=",
|
||||
"owner": "purpleclay",
|
||||
"repo": "go-overlay",
|
||||
"rev": "ff2b494b477eb4349dd40f0564cedab552f9804d",
|
||||
"rev": "5971ffb6c5de960d37f3b85c53cb5a30387cd05a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -329,11 +313,11 @@
|
||||
"rust-overlay": "rust-overlay_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1792911744,
|
||||
"narHash": "sha256-iXH6FL8HYaZg0+p9lUv5bEc4k1YpvwKFYtMYbY1phTA=",
|
||||
"lastModified": 1791702441,
|
||||
"narHash": "sha256-qHf8tVIYu6OE1PKcthmpBgblg27u3bU7v4TVqy0B3jg=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "01ff244467f011033d98286e8f4171a890e9060a",
|
||||
"revCount": 19,
|
||||
"rev": "2c2e99f6347e9be744a72f7df6043015989d6cd7",
|
||||
"revCount": 17,
|
||||
"type": "git",
|
||||
"url": "https://scm.wyattjmiller.com/wymiller/hildibrand.git"
|
||||
},
|
||||
@@ -349,11 +333,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1792818383,
|
||||
"narHash": "sha256-199i7ubVSXTMl+0AAlL7cVCXSjcI+jWByMcimYjeMX0=",
|
||||
"lastModified": 1792274446,
|
||||
"narHash": "sha256-AM1HmBeDnB2B3dSiXuCYeu7Me+lHNpz/P39lVxGJBuQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "24f2190587513b9c2f73db112a17844ae912d965",
|
||||
"rev": "ab3823b4b24c0c3ca984c1f3ee577fd6d667424c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -371,11 +355,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1792896866,
|
||||
"narHash": "sha256-/0tELNnhdSnP+bHSdWiEe6KpfSwi6WrTnT9cm/jNkjA=",
|
||||
"lastModified": 1792098797,
|
||||
"narHash": "sha256-u4DIIZgznEGzByxXrxWCXK19VcMtTBmi/M9gZ7Jk9bM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "c216bf5a1f173b0481bd5c8c489ebe5595ecc68c",
|
||||
"rev": "640725978b99076e18e069f6e7d2959124584f8f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -415,29 +399,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-minecraft": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_4",
|
||||
"nixpkgs": [
|
||||
"nur",
|
||||
"nixpkgs"
|
||||
],
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1792988509,
|
||||
"narHash": "sha256-1Li/v57ePpV9t6E57w/XTu760H6hYHztwm1RSd6RA8k=",
|
||||
"owner": "Infinidoge",
|
||||
"repo": "nix-minecraft",
|
||||
"rev": "931d87d3811cabc0277be27b94392d19291bd344",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Infinidoge",
|
||||
"repo": "nix-minecraft",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1789286504,
|
||||
@@ -456,11 +417,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1792898606,
|
||||
"narHash": "sha256-Mg3rRjsbMqhSMxop5PYMXos8SwAjejrxSgVThTvP9eg=",
|
||||
"lastModified": 1792030654,
|
||||
"narHash": "sha256-OaQwAtPMTjQiY2sT/2/62UbSPhzP/0aDnWzMm/NCiUw=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1f607aa79b6356ed45d3cd3c8079c196e79efa2c",
|
||||
"rev": "26f4107e47e3ad0ffd0db220469ba83b6f6d96e8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -472,11 +433,11 @@
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1792615934,
|
||||
"narHash": "sha256-MlvRfa1O5Cqc2/a+gG+l9TSuowEoCKCmrJ1d9oAVm0I=",
|
||||
"lastModified": 1792030654,
|
||||
"narHash": "sha256-OaQwAtPMTjQiY2sT/2/62UbSPhzP/0aDnWzMm/NCiUw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "da6dc0e7b26060f2f71ce3ef7088fb56ee44fa36",
|
||||
"rev": "26f4107e47e3ad0ffd0db220469ba83b6f6d96e8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -522,16 +483,15 @@
|
||||
"go-overlay": "go-overlay_2",
|
||||
"hildibrand": "hildibrand",
|
||||
"home-manager": "home-manager_2",
|
||||
"nix-minecraft": "nix-minecraft",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"rust-overlay": "rust-overlay_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1793051642,
|
||||
"narHash": "sha256-b+CbWZU8sYR9TNBg6KJur680E+5+Zm4S4IVzkzFnJEc=",
|
||||
"lastModified": 1792344577,
|
||||
"narHash": "sha256-Sbd2veIdg9iDiwwDeEKIiuk8FYMtjBXWvDlrrM0FjVA=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "8ec05b20cea4865f9fd5dd797c6e090f41863db1",
|
||||
"revCount": 121,
|
||||
"rev": "2debafc63297a24d2ca5c749b0d3f6bdbf6324cb",
|
||||
"revCount": 113,
|
||||
"type": "git",
|
||||
"url": "https://scm.wyattjmiller.com/wymiller/nur.git"
|
||||
},
|
||||
@@ -542,16 +502,16 @@
|
||||
},
|
||||
"nvf": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_5",
|
||||
"flake-compat": "flake-compat_4",
|
||||
"mnw": "mnw",
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1793047357,
|
||||
"narHash": "sha256-eY8aBTGSgtx+25254i22jyjbj+JQkEIfb+JyQ2Exnuk=",
|
||||
"lastModified": 1792175215,
|
||||
"narHash": "sha256-XD64JVLV8iE4lR+W5gkTweEaT+SBwOrSy0+le2WgITI=",
|
||||
"owner": "notashelf",
|
||||
"repo": "nvf",
|
||||
"rev": "60b4593979c39e9a1227c9913bd835bb1a59054b",
|
||||
"rev": "a736b60b1e2019931168979951c94dc46e342957",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -603,11 +563,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1792825530,
|
||||
"narHash": "sha256-aphXA2IFNd3q48++TKmfuuvDDjkrgGdJDnDIhij9684=",
|
||||
"lastModified": 1791620365,
|
||||
"narHash": "sha256-CVZXIDNw7HEwyD8X6q9Ln370Sc0ZqRlTzDRwOZ1hJMY=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "5b9f1198b59bcb31c5c3250b332e7d77590e6306",
|
||||
"rev": "e90fafa71b440fabcd52dd7fb017ab2da81c781a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -625,11 +585,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1792825530,
|
||||
"narHash": "sha256-aphXA2IFNd3q48++TKmfuuvDDjkrgGdJDnDIhij9684=",
|
||||
"lastModified": 1791620365,
|
||||
"narHash": "sha256-CVZXIDNw7HEwyD8X6q9Ln370Sc0ZqRlTzDRwOZ1hJMY=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "5b9f1198b59bcb31c5c3250b332e7d77590e6306",
|
||||
"rev": "e90fafa71b440fabcd52dd7fb017ab2da81c781a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -646,11 +606,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1792825530,
|
||||
"narHash": "sha256-aphXA2IFNd3q48++TKmfuuvDDjkrgGdJDnDIhij9684=",
|
||||
"lastModified": 1792219666,
|
||||
"narHash": "sha256-RMO08tKD+hFIL5ryWi85VY4aHE5oIpdV1h4kVFctOkw=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "5b9f1198b59bcb31c5c3250b332e7d77590e6306",
|
||||
"rev": "a110337465cfb76e3806b81b9db3094c3e6e770a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -664,11 +624,11 @@
|
||||
"nixpkgs": "nixpkgs_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1793000331,
|
||||
"narHash": "sha256-6sLQgHX/V/yF8VrhmsJroujeRua1GY3nDTEpnY7tHF4=",
|
||||
"lastModified": 1792307278,
|
||||
"narHash": "sha256-wJgFFtw/vlzsjWrQFmTn40TTkSkqHM4XXN0nh4q4uMk=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "0d0575988e4bb9ebc4cf1afb1cec1ceac0b5914e",
|
||||
"rev": "42076d1c6a0fb405ed04f9a674e4a8f69de62ba3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -706,21 +666,6 @@
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_3": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
||||
@@ -271,30 +271,6 @@
|
||||
];
|
||||
};
|
||||
|
||||
# Homestead 2.0 Minecraft server
|
||||
nixosConfigurations."krile" = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
inherit userName userEmail nur;
|
||||
hostname = "krile";
|
||||
role = "server";
|
||||
};
|
||||
modules = [
|
||||
myOverlays
|
||||
./modules/common
|
||||
./modules/machine/krile
|
||||
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = extraSpecialArgs // { isNixOS = true; role = "server"; };
|
||||
home-manager.backupFileExtension = "bak";
|
||||
home-manager.users.${userName}.imports = [./home];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# generic non-NixOS Linux machine
|
||||
homeConfigurations."generic" = let
|
||||
hostname = builtins.getEnv "HOSTNAME";
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@
|
||||
"Yer a wizard, Wyatt" \
|
||||
"Yer a lizard, Wyatt" \
|
||||
"Po-Tay-To boil em mash em stick em in a stew" \
|
||||
"Oh look it's the cutie patootie potato!" \
|
||||
"Oh look it's the cutie patootie potato!"
|
||||
"What a charming young man" \
|
||||
"Wyatt, you are smart, kind, and resilient. I believe in you no matter what life throws at you! Kick this project's butt!! - Nico" \
|
||||
"Ganbatte!"
|
||||
|
||||
@@ -1,105 +0,0 @@
|
||||
# Homestead 2.0 on krile
|
||||
|
||||
This module uses the Minecraft NixOS module and Fabric overlay re-exported by
|
||||
the existing `nur` flake input. It pins Minecraft 1.20.1, Fabric 0.19.5, Java 17,
|
||||
and the [official Homestead 2.0 server pack](https://cozystudios.org/homestead/server-pack/).
|
||||
The archive and all eight additional mods listed in its `startserver.sh` are
|
||||
downloaded with fixed SHA-256 hashes during the Nix build. The upstream startup
|
||||
script is not run.
|
||||
|
||||
`modules/machine/krile/configuration.nix` enables the server, accepts the Minecraft
|
||||
EULA, and opens TCP 25565 and UDP 24454 (Simple Voice Chat). Forward those ports
|
||||
to krile on your router if players connect from outside your network. Players
|
||||
need the Homestead 2.0 client pack.
|
||||
|
||||
The default heap is 6 GiB initially and 10 GiB maximum. Give the VM additional
|
||||
RAM for the OS, native libraries, and filesystem cache; 16 GiB total is a
|
||||
reasonable starting point.
|
||||
|
||||
## Deploy
|
||||
|
||||
On krile, from the repository root:
|
||||
|
||||
```bash
|
||||
nix eval --raw path:.#nixosConfigurations.krile.config.system.build.toplevel.drvPath
|
||||
sudo nixos-rebuild switch --flake path:.#krile
|
||||
```
|
||||
|
||||
The `path:.` form includes new files before they have been added to Git. Once the
|
||||
new module and krile files are tracked, `--flake .#krile` works as usual.
|
||||
|
||||
The service starts on boot and restarts after an unexpected exit. Check it with:
|
||||
|
||||
```bash
|
||||
systemctl status minecraft-server-homestead
|
||||
journalctl -u minecraft-server-homestead -f
|
||||
```
|
||||
|
||||
The console uses nix-minecraft's systemd FIFO. For example, run a command with:
|
||||
|
||||
```bash
|
||||
sudo sh -c 'echo list > /run/minecraft/homestead.stdin'
|
||||
```
|
||||
|
||||
Stop the service with `sudo systemctl stop minecraft-server-homestead` so it can
|
||||
save the world cleanly.
|
||||
|
||||
## Configuration and state
|
||||
|
||||
Worlds, player progress, and other runtime state live in
|
||||
`/srv/minecraft/homestead`. Back up that directory, particularly `world/`, before
|
||||
changing pack versions. The module does not provide automatic backups.
|
||||
|
||||
The `mods` directory and server icon are store symlinks. `config`, `defaultconfigs`,
|
||||
`kubejs`, `scripts`, and `patchouli_books` are writable copies of the pinned pack,
|
||||
recreated on each start and removed on stop by nix-minecraft. Edits to those
|
||||
copies do not persist across restarts. World data is not part of those managed
|
||||
directories.
|
||||
|
||||
Change memory in the host configuration:
|
||||
|
||||
```nix
|
||||
services.homestead.jvmOpts = "-Xms6G -Xmx12G -XX:+UseG1GC";
|
||||
```
|
||||
|
||||
Other server settings use the underlying nix-minecraft options:
|
||||
|
||||
```nix
|
||||
services.minecraft-servers.servers.homestead = {
|
||||
serverProperties = {
|
||||
server-port = 25566;
|
||||
max-players = 10;
|
||||
white-list = true;
|
||||
};
|
||||
# Add real player UUIDs here, or manage the whitelist through the console.
|
||||
whitelist = { };
|
||||
};
|
||||
```
|
||||
|
||||
Changing `server-port` also changes the opened TCP port. Voice chat remains on
|
||||
UDP 24454, matching the pack's `config/voicechat/voicechat-server.properties`.
|
||||
|
||||
To use this module on another NixOS host, pass `nur` in `specialArgs`, import
|
||||
`modules/games/homestead`, set `services.homestead.enable = true`, and set
|
||||
`services.minecraft-servers.eula = true` after accepting the EULA. The host must
|
||||
allow unfree packages, as the common modules already do for krile.
|
||||
|
||||
## Pack updates
|
||||
|
||||
For a new release, inspect the official archive and startup script, update the
|
||||
archive URL/hash in `package.nix`, update `required-mods.json` with any separate
|
||||
downloads and their hashes, and match the Minecraft/Fabric versions in
|
||||
`default.nix`. Evaluate and build before switching, then check the startup log.
|
||||
The pack is kept fixed at 2.0 until these declarations change.
|
||||
|
||||
## Validation
|
||||
|
||||
The krile system derivation evaluates, and the pack, Fabric launcher, and
|
||||
nix-minecraft setup/cleanup scripts build successfully. A temporary local server
|
||||
reached `Done`, started Simple Voice Chat, and exited with status 0 after `stop`,
|
||||
saving every dimension. Setup/cleanup was also checked to preserve world data
|
||||
and reset managed configs. Multiplayer gameplay was not tested.
|
||||
|
||||
The upstream 2.0 pack emits some nonfatal mixin/recipe warnings and an optional
|
||||
Falling Trees/Jade integration error during startup; these did not prevent the
|
||||
startup and shutdown check from passing.
|
||||
@@ -1,81 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
nur,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.services.homestead;
|
||||
modpack = pkgs.callPackage ./package.nix { };
|
||||
in
|
||||
{
|
||||
imports = [ nur.nixosModules.minecraft-servers ];
|
||||
|
||||
options.services.homestead = {
|
||||
enable = lib.mkEnableOption "the Homestead 2.0 Minecraft server";
|
||||
|
||||
openFirewall = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Open the Minecraft TCP port and Simple Voice Chat UDP port (24454).";
|
||||
};
|
||||
|
||||
jvmOpts = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "-Xms6G -Xmx10G -XX:+UseG1GC";
|
||||
description = "JVM options for Homestead. Leave additional RAM for the OS and native allocations.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
nixpkgs.overlays = [ nur.overlays.minecraft ];
|
||||
|
||||
services.minecraft-servers = {
|
||||
enable = true;
|
||||
servers.homestead = {
|
||||
enable = true;
|
||||
inherit (cfg) openFirewall jvmOpts;
|
||||
|
||||
package = pkgs.fabricServers.fabric-1_20_1.override {
|
||||
loaderVersion = "0.19.5";
|
||||
jre_headless = pkgs.jdk17_headless;
|
||||
};
|
||||
|
||||
managementSystem = {
|
||||
tmux.enable = false;
|
||||
systemd-socket.enable = true;
|
||||
};
|
||||
|
||||
# Match the properties generated by the pack's startserver.sh.
|
||||
serverProperties = lib.mapAttrs (_: lib.mkDefault) {
|
||||
motd = "Homestead 2.0";
|
||||
allow-flight = true;
|
||||
max-tick-time = 180000;
|
||||
simulation-distance = 6;
|
||||
view-distance = 10;
|
||||
server-port = 25565;
|
||||
online-mode = true;
|
||||
# keep-inventory = true;
|
||||
};
|
||||
|
||||
symlinks = {
|
||||
mods = "${modpack}/mods";
|
||||
"server-icon.png" = "${modpack}/server-icon.png";
|
||||
};
|
||||
|
||||
# Mods may rewrite their configs or generate files here. nix-minecraft
|
||||
# supplies writable copies on each start and cleans them on stop.
|
||||
files = lib.genAttrs [
|
||||
"config"
|
||||
"defaultconfigs"
|
||||
"kubejs"
|
||||
"scripts"
|
||||
"patchouli_books"
|
||||
] (dir: "${modpack}/${dir}");
|
||||
};
|
||||
};
|
||||
|
||||
networking.firewall.allowedUDPPorts = lib.mkIf cfg.openFirewall [ 24454 ];
|
||||
};
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
fetchurl,
|
||||
unzip,
|
||||
}:
|
||||
let
|
||||
# These eight downloads come from startserver.sh in the official 2.0 pack.
|
||||
requiredMods = map fetchurl (lib.importJSON ./required-mods.json);
|
||||
in
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "homestead-server-pack";
|
||||
version = "2.0";
|
||||
|
||||
src = fetchurl {
|
||||
name = "Homestead-2.0-Server.zip";
|
||||
url = "https://drive.usercontent.google.com/download?id=1SpJBa80o_Jx_yqLjQ49pz7HP1FY2PCJj&export=download&confirm=t";
|
||||
hash = "sha256-QVenE6dz+lZPHkC1hwL7Yy4lw6vg/Cr/8pnmK3iaK4o=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ unzip ];
|
||||
dontUnpack = true;
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p "$out"
|
||||
unzip -q "$src" \
|
||||
'mods/*' 'config/*' 'defaultconfigs/*' 'kubejs/*' \
|
||||
'scripts/*' 'patchouli_books/*' 'server-icon.png' -d "$out"
|
||||
|
||||
${lib.concatMapStringsSep "\n" (mod: ''
|
||||
install -m644 ${mod} "$out/mods/${mod.name}"
|
||||
'') requiredMods}
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Homestead 2.0 server assets, including the eight separately downloaded mods";
|
||||
homepage = "https://cozystudios.org/homestead/server-pack/";
|
||||
# The pack contains mods with different licenses; do not redistribute it.
|
||||
license = lib.licenses.unfree;
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
[
|
||||
{
|
||||
"name": "balm-fabric-1.20.1-7.3.44.jar",
|
||||
"url": "https://edge.forgecdn.net/files/8969/704/balm-fabric-1.20.1-7.3.44.jar",
|
||||
"hash": "sha256-hMoKTCjV9cxwjuEqKQ+U4ixMntDxXZNM0MDCMPClpMY="
|
||||
},
|
||||
{
|
||||
"name": "CraftTweaker-fabric-1.20.1-14.0.60.jar",
|
||||
"url": "https://edge.forgecdn.net/files/7772/872/CraftTweaker-fabric-1.20.1-14.0.60.jar",
|
||||
"hash": "sha256-y4Kl3wHCNr6oY8SxxZtgaS/ARGHWVIK/eW1EZizqiQA="
|
||||
},
|
||||
{
|
||||
"name": "libraryferret-fabric-1.20.1-4.0.0.jar",
|
||||
"url": "https://edge.forgecdn.net/files/4601/231/libraryferret-fabric-1.20.1-4.0.0.jar",
|
||||
"hash": "sha256-d/UX69gN5R+fh62cTZIrNMQNfF+2iu1tl0zu0NthuG0="
|
||||
},
|
||||
{
|
||||
"name": "sophisticatedbackpacks-1.20.1-3.23.4.5.110.jar",
|
||||
"url": "https://edge.forgecdn.net/files/7147/929/sophisticatedbackpacks-1.20.1-3.23.4.5.110.jar",
|
||||
"hash": "sha256-Fewy1BGnA4R0OldwrmoitxqEGK9/juu/+se/yKGDbA8="
|
||||
},
|
||||
{
|
||||
"name": "sophisticatedcore-1.20.1-1.2.7.15.166.jar",
|
||||
"url": "https://edge.forgecdn.net/files/7341/57/sophisticatedcore-1.20.1-1.2.7.15.166.jar",
|
||||
"hash": "sha256-Fzmsti4i+ZQk8yQkuZYr2S0p4HUvVJWqEW35p8Hdgxo="
|
||||
},
|
||||
{
|
||||
"name": "sophisticatedstorage-1.20.1-1.3.5.11.142.jar",
|
||||
"url": "https://edge.forgecdn.net/files/8032/765/sophisticatedstorage-1.20.1-1.3.5.11.142.jar",
|
||||
"hash": "sha256-VgjSIGpr0TJlhLUrTFp7Mpvpw/izOqOiQGAHiu0Lz4k="
|
||||
},
|
||||
{
|
||||
"name": "trashslot-fabric-1.20.1-15.1.5.jar",
|
||||
"url": "https://edge.forgecdn.net/files/8019/425/trashslot-fabric-1.20.1-15.1.5.jar",
|
||||
"hash": "sha256-u876a68TrhF8ShNtf/ZrYlx1QLncwNQHe08jcIXuRAg="
|
||||
},
|
||||
{
|
||||
"name": "wirelessredstone-fabric-1.20.1-1.1.2.jar",
|
||||
"url": "https://edge.forgecdn.net/files/5175/782/wirelessredstone-fabric-1.20.1-1.1.2.jar",
|
||||
"hash": "sha256-Kw8xy4ngmAgD9kEvwAjTS6KatJEnA6UPkI1X3xnWf48="
|
||||
}
|
||||
]
|
||||
@@ -151,7 +151,10 @@ in {
|
||||
|
||||
# Core networking module (see ../../networking/core.nix)
|
||||
network = {
|
||||
firewall.enable = true;
|
||||
firewall = {
|
||||
enable = true;
|
||||
firewalld.enable = true;
|
||||
};
|
||||
networkManager.enable = true;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
userName,
|
||||
nur,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../../pwrMgmt
|
||||
../../networking/core.nix
|
||||
../../virtualization/podman.nix
|
||||
../../games/homestead
|
||||
];
|
||||
|
||||
# Enable flakes for NixOS
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
# Custom kernel/boot stuff
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Set your timezone
|
||||
time.timeZone = "America/Detroit";
|
||||
|
||||
# Enable OpenSSH
|
||||
services.openssh.enable = true;
|
||||
|
||||
# Enable keyring
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
# Enable GnuPG
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
# Enable SUID wrappers (some programs need them)
|
||||
programs.mtr.enable = true;
|
||||
|
||||
# Enable Polkit
|
||||
security.polkit.enable = true;
|
||||
|
||||
# Power management (see ../../pwrMgmt/default.nix)
|
||||
pwrMgmt = {
|
||||
enable = true;
|
||||
cpuFreqGovernor = "performance";
|
||||
powertop.enable = false;
|
||||
};
|
||||
|
||||
network = {
|
||||
firewall = {
|
||||
enable = true;
|
||||
};
|
||||
networkManager.enable = true;
|
||||
};
|
||||
|
||||
# Add username to groups "wheel" and "video" - more may be added here later
|
||||
users = {
|
||||
users = {
|
||||
${userName} = {
|
||||
extraGroups = [ "wheel" "network" ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFV9eSc9L+aJLoKoexq2f/jb5rpyZnhuGiyhS8YQAbaS wyatt@wyattjmiller.com"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO4WKvKnnYpTbzZHFEslOKyfiiMqWxhW3AfX6E7ACmYU wyatt@wyattjmiller.com"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.fail2ban = {
|
||||
enable = true;
|
||||
package = pkgs.fail2ban;
|
||||
maxretry = 5;
|
||||
bantime = "3h";
|
||||
bantime-increment = {
|
||||
enable = true;
|
||||
rndtime = "10m";
|
||||
};
|
||||
};
|
||||
|
||||
services.homestead = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
services.minecraft-servers.eula = true;
|
||||
|
||||
system.stateVersion = "26.05";
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{ ... }: {
|
||||
imports = [
|
||||
./configuration.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/ec4c43ec-efcc-40ea-a4c8-411e60ee7c4e";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/140E-FE19";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/547bbd78-85be-4d17-a519-c4a2a923bdab"; }
|
||||
];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
@@ -8,6 +8,12 @@ in {
|
||||
options.network = {
|
||||
firewall = {
|
||||
enable = lib.mkEnableOption "system firewall";
|
||||
firewalld.enable = lib.mkEnableOption "firewalld with its nftables backend";
|
||||
nftables.extraConfig = lib.mkOption {
|
||||
type = lib.types.lines;
|
||||
default = "";
|
||||
description = "Rules inside a separate inet nftables table alongside firewalld";
|
||||
};
|
||||
tcpPorts = {
|
||||
ssh.enable = lib.mkEnableOption "SSH service port (22)";
|
||||
web.enable = lib.mkEnableOption "common web service ports (80, 443)";
|
||||
@@ -42,6 +48,21 @@ in {
|
||||
};
|
||||
};
|
||||
config = {
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.firewall.nftables.extraConfig == "" || cfg.firewall.firewalld.enable;
|
||||
message = "network.firewall.nftables.extraConfig requires network.firewall.firewalld.enable";
|
||||
}
|
||||
];
|
||||
services.firewalld.enable = cfg.firewall.firewalld.enable;
|
||||
networking.nftables = lib.mkIf cfg.firewall.firewalld.enable {
|
||||
enable = true;
|
||||
flushRuleset = false;
|
||||
tables."local-extra" = lib.mkIf (cfg.firewall.nftables.extraConfig != "") {
|
||||
family = "inet";
|
||||
content = cfg.firewall.nftables.extraConfig;
|
||||
};
|
||||
};
|
||||
networking.firewall = {
|
||||
enable = cfg.firewall.enable;
|
||||
allowedTCPPorts = lib.flatten [
|
||||
|
||||
Reference in new issue
Block a user