Nix configurations for my homelab
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add service for minecraft server

This is using "The Last Voyage of the Harpy Express" modpack

yemou 941fe2f6 7b33a85b

+186 -24
+93 -24
flake.lock
··· 41 41 "flake-compat": { 42 42 "flake": false, 43 43 "locked": { 44 + "lastModified": 1747046372, 45 + "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", 46 + "owner": "edolstra", 47 + "repo": "flake-compat", 48 + "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", 49 + "type": "github" 50 + }, 51 + "original": { 52 + "owner": "edolstra", 53 + "repo": "flake-compat", 54 + "type": "github" 55 + } 56 + }, 57 + "flake-compat_2": { 58 + "flake": false, 59 + "locked": { 44 60 "lastModified": 1733328505, 45 61 "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", 46 62 "owner": "edolstra", ··· 54 70 "type": "github" 55 71 } 56 72 }, 57 - "flake-compat_2": { 73 + "flake-compat_3": { 58 74 "flake": false, 59 75 "locked": { 60 76 "lastModified": 1751685974, ··· 70 86 }, 71 87 "flake-utils": { 72 88 "inputs": { 73 - "systems": "systems" 89 + "systems": "systems_2" 74 90 }, 75 91 "locked": { 76 92 "lastModified": 1731533236, ··· 88 104 }, 89 105 "flake-utils_2": { 90 106 "inputs": { 91 - "systems": "systems_2" 107 + "systems": "systems_3" 92 108 }, 93 109 "locked": { 94 110 "lastModified": 1731533236, ··· 133 149 ] 134 150 }, 135 151 "locked": { 136 - "lastModified": 1775320414, 137 - "narHash": "sha256-pIDPHus8udcxO4lT+zUULBfvue2D08E73abzVEJNE+8=", 152 + "lastModified": 1775360939, 153 + "narHash": "sha256-XUBlSgUFdvTh6+K5LcI5mJu5F5L8scmJDMRiZM484TM=", 138 154 "owner": "nix-community", 139 155 "repo": "home-manager", 140 - "rev": "5ee3b3ef63e469c84639c2c9e282726352c86069", 156 + "rev": "2097a5c82bdc099c6135eae4b111b78124604554", 141 157 "type": "github" 142 158 }, 143 159 "original": { ··· 277 293 "url": "https://cdn.jsdelivr.net/npm/mermaid@11.12.3/dist/mermaid.min.js" 278 294 } 279 295 }, 296 + "nix-minecraft": { 297 + "inputs": { 298 + "flake-compat": "flake-compat", 299 + "nixpkgs": "nixpkgs_2", 300 + "systems": "systems" 301 + }, 302 + "locked": { 303 + "lastModified": 1775413904, 304 + "narHash": "sha256-6qug2SrszBfajlC6xnfnxN7yijQGsL4yv5nUyXNIiaY=", 305 + "owner": "Infinidoge", 306 + "repo": "nix-minecraft", 307 + "rev": "dd75dc5627ac22a42661cfcfc9266e0dbf93338c", 308 + "type": "github" 309 + }, 310 + "original": { 311 + "owner": "Infinidoge", 312 + "ref": "refs/pull/206/head", 313 + "repo": "nix-minecraft", 314 + "type": "github" 315 + } 316 + }, 280 317 "nixpkgs": { 281 318 "locked": { 282 319 "lastModified": 1768564909, ··· 327 364 }, 328 365 "nixpkgs_2": { 329 366 "locked": { 330 - "lastModified": 1775285073, 331 - "narHash": "sha256-B7l3jN6Fnud6WTt5IK/WrMKFCLvB3onPWuTI4tXq4Y8=", 367 + "lastModified": 1769461804, 368 + "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", 369 + "owner": "nixos", 370 + "repo": "nixpkgs", 371 + "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d", 372 + "type": "github" 373 + }, 374 + "original": { 375 + "owner": "nixos", 376 + "ref": "nixos-unstable", 377 + "repo": "nixpkgs", 378 + "type": "github" 379 + } 380 + }, 381 + "nixpkgs_3": { 382 + "locked": { 383 + "lastModified": 1775371993, 384 + "narHash": "sha256-shlcgEOzW6rl7zmZeYBMP9EpF3O/cTL7/HpWlyqearw=", 332 385 "owner": "NixOS", 333 386 "repo": "nixpkgs", 334 - "rev": "b2c0242c2db5ac5fc532cb157c6e796e621402d5", 387 + "rev": "ff2af6f7ebc6c123603d5689aeea6461290f46b5", 335 388 "type": "github" 336 389 }, 337 390 "original": { ··· 341 394 "type": "github" 342 395 } 343 396 }, 344 - "nixpkgs_3": { 397 + "nixpkgs_4": { 345 398 "locked": { 346 399 "lastModified": 1722403750, 347 400 "narHash": "sha256-tRmn6UiFAPX0m9G1AVcEPjWEOc9BtGsxGcs7Bz3MpsM=", ··· 357 410 "type": "github" 358 411 } 359 412 }, 360 - "nixpkgs_4": { 413 + "nixpkgs_5": { 361 414 "locked": { 362 - "lastModified": 1774610258, 363 - "narHash": "sha256-HaThtroVD9wRdx7KQk0B75JmFcXlMUoEdDFNOMOlsOs=", 415 + "lastModified": 1775126147, 416 + "narHash": "sha256-J0dZU4atgcfo4QvM9D92uQ0Oe1eLTxBVXjJzdEMQpD0=", 364 417 "owner": "NixOS", 365 418 "repo": "nixpkgs", 366 - "rev": "832efc09b4caf6b4569fbf9dc01bec3082a00611", 419 + "rev": "8d8c1fa5b412c223ffa47410867813290cdedfef", 367 420 "type": "github" 368 421 }, 369 422 "original": { ··· 373 426 "type": "github" 374 427 } 375 428 }, 376 - "nixpkgs_5": { 429 + "nixpkgs_6": { 377 430 "locked": { 378 431 "lastModified": 1771848320, 379 432 "narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=", ··· 391 444 }, 392 445 "roc-lang": { 393 446 "inputs": { 394 - "flake-compat": "flake-compat", 447 + "flake-compat": "flake-compat_2", 395 448 "flake-utils": "flake-utils", 396 - "nixpkgs": "nixpkgs_3", 449 + "nixpkgs": "nixpkgs_4", 397 450 "rust-overlay": "rust-overlay" 398 451 }, 399 452 "locked": { ··· 414 467 "inputs": { 415 468 "home-manager": "home-manager", 416 469 "impermanence": "impermanence", 417 - "nixpkgs": "nixpkgs_2", 470 + "nix-minecraft": "nix-minecraft", 471 + "nixpkgs": "nixpkgs_3", 418 472 "nixpkgs-stable": "nixpkgs-stable", 419 473 "nixpkgs-unstable": "nixpkgs-unstable", 420 474 "roc-lang": "roc-lang", ··· 464 518 }, 465 519 "sops-nix": { 466 520 "inputs": { 467 - "nixpkgs": "nixpkgs_4" 521 + "nixpkgs": "nixpkgs_5" 468 522 }, 469 523 "locked": { 470 - "lastModified": 1775188331, 471 - "narHash": "sha256-/0BoSi0Dg0ON7IW0oscM12WSPBaMSCn36XTt0lHZoy8=", 524 + "lastModified": 1775365543, 525 + "narHash": "sha256-f50qrK0WwZ9z5EdaMGWOTtALgSF7yb7XwuE7LjCuDmw=", 472 526 "owner": "Mic92", 473 527 "repo": "sops-nix", 474 - "rev": "8f093d0d2f08f37317778bd94db5951d6cce6c46", 528 + "rev": "a4ee2de76efb759fe8d4868c33dec9937897916f", 475 529 "type": "github" 476 530 }, 477 531 "original": { ··· 523 577 "type": "github" 524 578 } 525 579 }, 580 + "systems_3": { 581 + "locked": { 582 + "lastModified": 1681028828, 583 + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 584 + "owner": "nix-systems", 585 + "repo": "default", 586 + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 587 + "type": "github" 588 + }, 589 + "original": { 590 + "owner": "nix-systems", 591 + "repo": "default", 592 + "type": "github" 593 + } 594 + }, 526 595 "tangled": { 527 596 "inputs": { 528 597 "actor-typeahead-src": "actor-typeahead-src", 529 598 "fenix": "fenix", 530 - "flake-compat": "flake-compat_2", 599 + "flake-compat": "flake-compat_3", 531 600 "gomod2nix": "gomod2nix", 532 601 "htmx-src": "htmx-src", 533 602 "htmx-ws-src": "htmx-ws-src", ··· 536 605 "inter-fonts-src": "inter-fonts-src", 537 606 "lucide-src": "lucide-src", 538 607 "mermaid-src": "mermaid-src", 539 - "nixpkgs": "nixpkgs_5", 608 + "nixpkgs": "nixpkgs_6", 540 609 "sqlite-lib-src": "sqlite-lib-src" 541 610 }, 542 611 "locked": {
+1
flake.nix
··· 20 20 inputs.nixpkgs.follows = "nixpkgs"; 21 21 }; 22 22 23 + nix-minecraft.url = "github:Infinidoge/nix-minecraft?ref=refs/pull/206/head"; 23 24 roc-lang.url = "github:roc-lang/roc"; 24 25 tangled.url = "git+https://tangled.org/tangled.org/core?ref=refs/tags/v1.13.0-alpha"; 25 26 };
+3
lily/config.nix
··· 39 39 ../modules/services/caddy/websites/pink-meyou.nix 40 40 ../modules/services/caddy/websites/pink-yemou.nix 41 41 42 + ../modules/services/minecraft 43 + ../modules/services/minecraft/harpy-express.nix 44 + 42 45 ../modules/services/arr.nix 43 46 ../modules/services/jellyfin.nix 44 47 ../modules/services/murmur.nix
+23
modules/services/minecraft/default.nix
··· 1 + { config, nix-minecraft, ... }: 2 + { 3 + imports = [ nix-minecraft.nixosModules.minecraft-servers ]; 4 + nixpkgs.overlays = [ nix-minecraft.overlay ]; 5 + 6 + garden.unfree = [ "minecraft-server" ]; 7 + 8 + environment.persistence."/data/persistent".directories = [ 9 + { 10 + directory = "${config.services.minecraft-servers.dataDir}"; 11 + mode = "0700"; 12 + user = "${config.services.minecraft-servers.user}"; 13 + group = "${config.services.minecraft-servers.group}"; 14 + } 15 + ]; 16 + 17 + services.minecraft-servers = { 18 + enable = true; 19 + eula = true; 20 + openFirewall = false; 21 + dataDir = "/var/lib/minecraft"; 22 + }; 23 + }
+66
modules/services/minecraft/harpy-express.nix
··· 1 + { pkgs, ... }: 2 + { 3 + 4 + networking.firewall = { 5 + allowedTCPPorts = [ 25565 ]; 6 + allowedUDPPorts = [ 24454 ]; 7 + }; 8 + 9 + services.minecraft-servers.servers.harpy-express = 10 + let 11 + modpack = pkgs.fetchModrinthModpack { 12 + url = "https://cdn.modrinth.com/data/qusMP4Bj/versions/5cJWyHka/The%20Last%20Voyage%20of%20the%20Harpy%20Express%201.3.2.mrpack"; 13 + packHash = "sha256-KMu9HIrxzbAECMK1RaQFKYnVc6L7iUU7/Cq2CYCWgHE="; 14 + side = "server"; 15 + }; 16 + in 17 + { 18 + enable = true; 19 + package = pkgs.fabricServers.fabric-1_21_1; 20 + jvmOpts = "-Xmx4G -Xms1G"; 21 + operators.yemou = { 22 + uuid = "12069472-23e7-48a8-b893-461483a4da88"; 23 + bypassesPlayerLimit = true; 24 + }; 25 + serverProperties = { 26 + allow-flight = true; 27 + allow-nether = false; 28 + difficulty = "peaceful"; 29 + enable-command-block = true; 30 + gamemode = "adventure"; 31 + generate-structures = false; 32 + motd = "The Last Voyage of the Harpy Express (1.3.2)"; 33 + server-ip = "::"; 34 + simulation-distance = 8; 35 + spawn-animals = false; 36 + spawn-monsters = false; 37 + spawn-npcs = false; 38 + spawn-protection = 0; 39 + view-distance = 32; 40 + }; 41 + symlinks."mods" = "${modpack}/mods"; 42 + files = { 43 + "config" = "${modpack}/config"; 44 + "config/voicechat/voicechat-server.properties" = pkgs.writeText "voicechat-server.properties" '' 45 + port=24454 46 + bind_address= 47 + max_voice_distance=10.0 48 + whisper_distance=4.0 49 + codec=VOIP 50 + mtu_size=1024 51 + keep_alive=1000 52 + enable_groups=false 53 + voice_host= 54 + allow_recording=true 55 + spectator_interaction=false 56 + spectator_player_possession=false 57 + force_voice_chat=false 58 + login_timeout=10000 59 + broadcast_range=-1.0 60 + allow_pings=true 61 + use_natives=true 62 + ''; 63 + "world" = "${modpack}/saves/The Harpy Express"; 64 + }; 65 + }; 66 + }