diff --git a/configuration/default.nix b/configuration/default.nix index f874733..239f9f6 100644 --- a/configuration/default.nix +++ b/configuration/default.nix @@ -22,7 +22,6 @@ ./services/foundryvtt.nix ./services/gitea.nix ./services/metrics - ./services/minecraft.nix ./services/nextcloud.nix ./services/webserver.nix ./services/wireguard.nix @@ -71,6 +70,8 @@ 8448 # starbound 21025 + # Minecraft + 25565 config.services.coturn.listening-port config.services.coturn.tls-listening-port @@ -79,6 +80,9 @@ ]; allowedUDPPorts = [ + # More minecraft + 25565 + config.services.coturn.listening-port config.services.coturn.tls-listening-port config.services.coturn.alt-listening-port diff --git a/configuration/services/minecraft.nix b/configuration/services/minecraft.nix deleted file mode 100644 index 0477f44..0000000 --- a/configuration/services/minecraft.nix +++ /dev/null @@ -1,83 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: -{ - services.minecraft-server = { - enable = true; - eula = true; - # jvmOpts are set using a file for forge - # jvmOpts = "-Xmx8G -Xms8G"; - openFirewall = true; - - declarative = true; - - whitelist = { - tlater = "140d177a-966f-41b8-a4c0-e305babd291b"; - romino25 = "59cd1648-14a4-4bcf-8f5a-2e1bde678f2c"; - lasi25 = "0ab6e3d1-544a-47e7-8538-2e6c248e49a4"; - }; - - serverProperties = { - allow-flight = true; - difficulty = "hard"; - motd = "tlater.net"; - spawn-protection = 1; - white-list = true; - enable-query = true; - enable-status = true; - - # Allows the server to write chunks without hogging the main - # thread... - sync-chunk-writes = false; - # Disables chat reporting, because we don't need any of that - # drama on a lil' friends-only server. - enforce-secure-profile = false; - }; - - package = pkgs.writeShellApplication { - name = "minecraft-server"; - runtimeInputs = with pkgs; [ jdk17_headless ]; - - text = '' - exec /var/lib/minecraft/run.sh $@ - ''; - }; - }; - - systemd.services.minecraft-server = { - path = with pkgs; [ jdk17_headless ]; - - # Since we read from our own HTTP server, we need to wait for it - # to be up - after = [ "nginx.service" ]; - - serviceConfig = { - # Use packwiz to install mods - ExecStartPre = [ - "${pkgs.jdk17_headless}/bin/java -jar ${config.services.minecraft-server.dataDir}/packwiz-installer-bootstrap.jar -g -s server 'https://minecraft.${config.services.nginx.domain}/cobblemon-pack/pack.toml'" - ]; - # Forge requires some bonus JVM options, which they include in a - # little `run.sh` script - ExecStart = lib.mkForce "${config.services.minecraft-server.dataDir}/run.sh --nogui"; - }; - }; - - systemd.tmpfiles.settings."10-minecraft" = { - "/srv/minecraft".d = { - user = "nginx"; - group = "minecraft"; - mode = "0775"; - }; - }; - - services.nginx.virtualHosts."minecraft.${config.services.nginx.domain}" = { - forceSSL = true; - useACMEHost = "tlater.net"; - enableHSTS = true; - - root = "/srv/minecraft"; - }; -} diff --git a/flake.lock b/flake.lock index 37c3d5f..276b8b2 100644 --- a/flake.lock +++ b/flake.lock @@ -300,11 +300,11 @@ ] }, "locked": { - "lastModified": 1739841949, - "narHash": "sha256-lSOXdgW/1zi/SSu7xp71v+55D5Egz8ACv0STkj7fhbs=", + "lastModified": 1739634831, + "narHash": "sha256-xFnU+uUl48Icas2wPQ+ZzlL2O3n8f6J2LrzNK9f2nng=", "owner": "nix-community", "repo": "disko", - "rev": "15dbf8cebd8e2655a883b74547108e089f051bf0", + "rev": "fa5746ecea1772cf59b3f34c5816ab3531478142", "type": "github" }, "original": { @@ -595,11 +595,11 @@ ] }, "locked": { - "lastModified": 1739712626, - "narHash": "sha256-u3m+awbdL+0BKk8IWidsWMr+R0ian3GZMUlH7623kd8=", + "lastModified": 1737076827, + "narHash": "sha256-vM9C1gFiQGa3nTYqmTBI8MoiUfprkQdepUBbxV7ECMQ=", "owner": "reckenrode", "repo": "nix-foundryvtt", - "rev": "a7fa493ba2c623cf90e83756b62285b3b58f18d2", + "rev": "0a72a4bf64224c6584fd1b9e9f0012dd09af979a", "type": "github" }, "original": { @@ -746,11 +746,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1740215764, - "narHash": "sha256-wzBbGGZ6i1VVBA/cDJaLfuuGYCUriD7fwsLgJJHRVRk=", + "lastModified": 1739611738, + "narHash": "sha256-3bnOIZz8KXtzcaXGuH9Eriv0HiQyr1EIfcye+VHLQZE=", "owner": "nixos", "repo": "nixpkgs", - "rev": "8465e233b0668cf162c608a92e62e8d78c1ba7e4", + "rev": "31ff66eb77d02e9ac34b7256a02edb1c43fb9998", "type": "github" }, "original": { @@ -762,11 +762,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1740162160, - "narHash": "sha256-SSYxFhqCOb3aiPb6MmN68yEzBIltfom8IgRz7phHscM=", + "lastModified": 1739578539, + "narHash": "sha256-jGiez5BtGGJUB/LXzRa+4AQurMO9acc1B69kBfgQhJc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "11415c7ae8539d6292f2928317ee7a8410b28bb9", + "rev": "30d4471a8a2a13b716530d3aad60b9846ea5ff83", "type": "github" }, "original": { @@ -1078,13 +1078,14 @@ "locked": { "lastModified": 1740082109, "narHash": "sha256-WdRNkwsIotFOSymee/yQyH46RmYtuxd1FENhvGL4KRc=", - "ref": "refs/heads/main", + "ref": "tlater/rust-rewrite", "rev": "a1b48cf2ba194054e2d8816c94a84cebc4fb5de0", "revCount": 23, "type": "git", "url": "ssh://git@github.com/sonnenshift/battery-manager" }, "original": { + "ref": "tlater/rust-rewrite", "type": "git", "url": "ssh://git@github.com/sonnenshift/battery-manager" } diff --git a/flake.nix b/flake.nix index b31d108..737a17f 100644 --- a/flake.nix +++ b/flake.nix @@ -23,7 +23,7 @@ }; sonnenshift = { - url = "git+ssh://git@github.com/sonnenshift/battery-manager"; + url = "git+ssh://git@github.com/sonnenshift/battery-manager?ref=tlater/rust-rewrite"; inputs.nixpkgs.follows = "nixpkgs"; }; }; diff --git a/pkgs/crowdsec/_sources/generated.json b/pkgs/crowdsec/_sources/generated.json index ac251aa..634bc18 100644 --- a/pkgs/crowdsec/_sources/generated.json +++ b/pkgs/crowdsec/_sources/generated.json @@ -21,7 +21,7 @@ }, "crowdsec-hub": { "cargoLocks": null, - "date": "2025-02-22", + "date": "2025-02-16", "extract": null, "name": "crowdsec-hub", "passthru": null, @@ -33,10 +33,10 @@ "name": null, "owner": "crowdsecurity", "repo": "hub", - "rev": "f9883cd6c7d1913c13e4a3a69d9a0b887a7d57df", - "sha256": "sha256-45pUln7Qj5luY9I9BE2qhzjH7kv4IbYvNoEX3/4AVVg=", + "rev": "f7d7f476f88a4af05e1cfb3994536990adecfb57", + "sha256": "sha256-m78uipryHDKixJzrF4K59ioAJ3WJN1JlXEC0DNVMCJ8=", "type": "github" }, - "version": "f9883cd6c7d1913c13e4a3a69d9a0b887a7d57df" + "version": "f7d7f476f88a4af05e1cfb3994536990adecfb57" } } \ No newline at end of file diff --git a/pkgs/crowdsec/_sources/generated.nix b/pkgs/crowdsec/_sources/generated.nix index 9c63cc5..7ef44e6 100644 --- a/pkgs/crowdsec/_sources/generated.nix +++ b/pkgs/crowdsec/_sources/generated.nix @@ -14,14 +14,14 @@ }; crowdsec-hub = { pname = "crowdsec-hub"; - version = "f9883cd6c7d1913c13e4a3a69d9a0b887a7d57df"; + version = "f7d7f476f88a4af05e1cfb3994536990adecfb57"; src = fetchFromGitHub { owner = "crowdsecurity"; repo = "hub"; - rev = "f9883cd6c7d1913c13e4a3a69d9a0b887a7d57df"; + rev = "f7d7f476f88a4af05e1cfb3994536990adecfb57"; fetchSubmodules = false; - sha256 = "sha256-45pUln7Qj5luY9I9BE2qhzjH7kv4IbYvNoEX3/4AVVg="; + sha256 = "sha256-m78uipryHDKixJzrF4K59ioAJ3WJN1JlXEC0DNVMCJ8="; }; - date = "2025-02-22"; + date = "2025-02-16"; }; }