diff options
author | Linnnus <[email protected]> | 2025-01-29 10:51:10 +0100 |
---|---|---|
committer | Linnnus <[email protected]> | 2025-01-29 10:59:01 +0100 |
commit | 347f032f66125b8e9fea7f5f5de0399aceee8fc0 (patch) | |
tree | d191e8aa6561633ae6a0593ebbf69761fa42a357 /hosts/ahmed/minecraft | |
parent | 827c6802fc8947ca063d969f6356be75f28e1040 (diff) |
ahmed: Factor configuration.nix into smaller submodules
I checked that this didn't result in any (non-trivial) changes like so:
$ vi hosts/ahmed/configuration.nix
$ nixos-rebuild build --flake .#ahmed
$ nix-diff /run/current-system ./result
Diffstat (limited to 'hosts/ahmed/minecraft')
-rw-r--r-- | hosts/ahmed/minecraft/default.nix | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/hosts/ahmed/minecraft/default.nix b/hosts/ahmed/minecraft/default.nix new file mode 100644 index 0000000..112ef8f --- /dev/null +++ b/hosts/ahmed/minecraft/default.nix @@ -0,0 +1,27 @@ +# This module configures a Minecraft server. +# +# Most of the heavy lifting is done in the reusable module `modules/nixos/on-demand-minecraft/`. +{pkgs, ...}: { + # Set up Minecraft server. + services.on-demand-minecraft = { + enable = true; + eula = true; + + package = pkgs.unstable.papermc; + + openFirewall = true; + + # Try shutting down every 10 minutes. + frequency-check-players = "*-*-* *:00/10:00"; + + # Seed requested by Tobias. + server-properties."level-seed" = "1727502807"; + + # I changed the default location after creating the world. + data-dir = "/srv/minecrafter/papermc-1.21.4-15"; + }; + + # Update the DDNS. + # This would be the "IP" we give to folks. + services.cloudflare-dyndns.domains = ["minecraft.linus.onl"]; +} |