some more minecraft server shenanigans, now with nix-minecraft
This commit is contained in:
parent
519a2ea9f9
commit
fcf020a8b8
3 changed files with 204 additions and 86 deletions
188
flake.lock
188
flake.lock
|
@ -353,6 +353,22 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_10": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -417,21 +433,6 @@
|
|||
}
|
||||
},
|
||||
"flake-compat_6": {
|
||||
"locked": {
|
||||
"lastModified": 1717312683,
|
||||
"narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "flake-compat",
|
||||
"rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_7": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1673956053,
|
||||
|
@ -447,14 +448,29 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_7": {
|
||||
"locked": {
|
||||
"lastModified": 1717312683,
|
||||
"narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "flake-compat",
|
||||
"rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_8": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"lastModified": 1673956053,
|
||||
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -716,11 +732,11 @@
|
|||
"systems": "systems_10"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"lastModified": 1681202837,
|
||||
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -748,6 +764,24 @@
|
|||
}
|
||||
},
|
||||
"flake-utils_7": {
|
||||
"inputs": {
|
||||
"systems": "systems_12"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_8": {
|
||||
"locked": {
|
||||
"lastModified": 1659877975,
|
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||
|
@ -762,9 +796,9 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_8": {
|
||||
"flake-utils_9": {
|
||||
"inputs": {
|
||||
"systems": "systems_14"
|
||||
"systems": "systems_15"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
|
@ -1363,7 +1397,7 @@
|
|||
},
|
||||
"lib-aggregate_2": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_5",
|
||||
"flake-utils": "flake-utils_6",
|
||||
"nixpkgs-lib": "nixpkgs-lib_2"
|
||||
},
|
||||
"locked": {
|
||||
|
@ -1543,7 +1577,7 @@
|
|||
"inputs": {
|
||||
"flake-parts": "flake-parts_5",
|
||||
"nix-github-actions": "nix-github-actions",
|
||||
"nixpkgs": "nixpkgs_10",
|
||||
"nixpkgs": "nixpkgs_11",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
|
@ -1612,6 +1646,26 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-minecraft": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_6",
|
||||
"flake-utils": "flake-utils_5",
|
||||
"nixpkgs": "nixpkgs_9"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721870898,
|
||||
"narHash": "sha256-K3U4emkszxLkPW9LOdkV49IB2hnMrGNcpVDbCclZ+as=",
|
||||
"owner": "Infinidoge",
|
||||
"repo": "nix-minecraft",
|
||||
"rev": "7161fd4ca148b330c180714e40c7399afca3f97c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Infinidoge",
|
||||
"repo": "nix-minecraft",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpak": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_4",
|
||||
|
@ -1728,10 +1782,10 @@
|
|||
},
|
||||
"nixpkgs-wayland": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_6",
|
||||
"flake-compat": "flake-compat_7",
|
||||
"lib-aggregate": "lib-aggregate_2",
|
||||
"nix-eval-jobs": "nix-eval-jobs",
|
||||
"nixpkgs": "nixpkgs_11"
|
||||
"nixpkgs": "nixpkgs_12"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1720471092,
|
||||
|
@ -1748,6 +1802,22 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs_10": {
|
||||
"locked": {
|
||||
"lastModified": 1720768451,
|
||||
"narHash": "sha256-EYekUHJE2gxeo2pM/zM9Wlqw1Uw2XTJXOSAO79ksc4Y=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7e7c39ea35c5cdd002cd4588b03a3fb9ece6fad9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_11": {
|
||||
"locked": {
|
||||
"lastModified": 1719082008,
|
||||
"narHash": "sha256-jHJSUH619zBQ6WdC21fFAlDxHErKVDJ5fpN0Hgx4sjs=",
|
||||
|
@ -1763,7 +1833,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_11": {
|
||||
"nixpkgs_12": {
|
||||
"locked": {
|
||||
"lastModified": 1720418205,
|
||||
"narHash": "sha256-cPJoFPXU44GlhWg4pUk9oUPqurPlCFZ11ZQPk21GTPU=",
|
||||
|
@ -1779,7 +1849,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_12": {
|
||||
"nixpkgs_13": {
|
||||
"locked": {
|
||||
"lastModified": 1656753965,
|
||||
"narHash": "sha256-BCrB3l0qpJokOnIVc3g2lHiGhnjUi0MoXiw6t1o8H1E=",
|
||||
|
@ -1795,7 +1865,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_13": {
|
||||
"nixpkgs_14": {
|
||||
"locked": {
|
||||
"lastModified": 1702350026,
|
||||
"narHash": "sha256-A+GNZFZdfl4JdDphYKBJ5Ef1HOiFsP18vQe9mqjmUis=",
|
||||
|
@ -1811,7 +1881,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_14": {
|
||||
"nixpkgs_15": {
|
||||
"locked": {
|
||||
"lastModified": 1682809678,
|
||||
"narHash": "sha256-jqR8t82mWotOSgnWZvr6xXCO/tc3fCPTLMPvI7Jo5rA=",
|
||||
|
@ -1827,7 +1897,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_15": {
|
||||
"nixpkgs_16": {
|
||||
"locked": {
|
||||
"lastModified": 1719506693,
|
||||
"narHash": "sha256-C8e9S7RzshSdHB7L+v9I51af1gDM5unhJ2xO1ywxNH8=",
|
||||
|
@ -1957,15 +2027,15 @@
|
|||
},
|
||||
"nixpkgs_9": {
|
||||
"locked": {
|
||||
"lastModified": 1720768451,
|
||||
"narHash": "sha256-EYekUHJE2gxeo2pM/zM9Wlqw1Uw2XTJXOSAO79ksc4Y=",
|
||||
"owner": "NixOS",
|
||||
"lastModified": 1715266358,
|
||||
"narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7e7c39ea35c5cdd002cd4588b03a3fb9ece6fad9",
|
||||
"rev": "f1010e0469db743d14519a1efd37e23f8513d714",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
|
@ -2026,7 +2096,7 @@
|
|||
"nvf": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_6",
|
||||
"flake-utils": "flake-utils_6",
|
||||
"flake-utils": "flake-utils_7",
|
||||
"mnw": "mnw",
|
||||
"nil": "nil",
|
||||
"nixpkgs": [
|
||||
|
@ -2133,7 +2203,7 @@
|
|||
"plugin-vim-vsnip": "plugin-vim-vsnip",
|
||||
"plugin-which-key": "plugin-which-key",
|
||||
"rnix-lsp": "rnix-lsp",
|
||||
"systems": "systems_12",
|
||||
"systems": "systems_13",
|
||||
"zig": "zig"
|
||||
},
|
||||
"locked": {
|
||||
|
@ -3779,7 +3849,7 @@
|
|||
"rnix-lsp": {
|
||||
"inputs": {
|
||||
"naersk": "naersk",
|
||||
"nixpkgs": "nixpkgs_12",
|
||||
"nixpkgs": "nixpkgs_13",
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
|
@ -3813,8 +3883,9 @@
|
|||
"iio-hyprland": "iio-hyprland",
|
||||
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
||||
"nh": "nh",
|
||||
"nix-minecraft": "nix-minecraft",
|
||||
"nixpak": "nixpak",
|
||||
"nixpkgs": "nixpkgs_9",
|
||||
"nixpkgs": "nixpkgs_10",
|
||||
"nixpkgs-wayland": "nixpkgs-wayland",
|
||||
"nur": "nur",
|
||||
"nvf": "nvf",
|
||||
|
@ -3915,7 +3986,7 @@
|
|||
},
|
||||
"schizofox": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_8",
|
||||
"flake-compat": "flake-compat_9",
|
||||
"flake-parts": "flake-parts_7",
|
||||
"home-manager": "home-manager_3",
|
||||
"nixpak": [
|
||||
|
@ -3925,7 +3996,7 @@
|
|||
"nixpkgs"
|
||||
],
|
||||
"searx-randomizer": "searx-randomizer",
|
||||
"systems": "systems_13"
|
||||
"systems": "systems_14"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719058240,
|
||||
|
@ -3967,7 +4038,7 @@
|
|||
"shadower": {
|
||||
"inputs": {
|
||||
"naersk": "naersk_2",
|
||||
"nixpkgs": "nixpkgs_14"
|
||||
"nixpkgs": "nixpkgs_15"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721405001,
|
||||
|
@ -4065,6 +4136,21 @@
|
|||
}
|
||||
},
|
||||
"systems_13": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_14": {
|
||||
"locked": {
|
||||
"lastModified": 1689347949,
|
||||
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||
|
@ -4079,7 +4165,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_14": {
|
||||
"systems_15": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
|
@ -4253,8 +4339,8 @@
|
|||
},
|
||||
"waybar": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_9",
|
||||
"nixpkgs": "nixpkgs_15"
|
||||
"flake-compat": "flake-compat_10",
|
||||
"nixpkgs": "nixpkgs_16"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1720552096,
|
||||
|
@ -4273,7 +4359,7 @@
|
|||
"woomer": {
|
||||
"inputs": {
|
||||
"crane": "crane_5",
|
||||
"flake-utils": "flake-utils_8",
|
||||
"flake-utils": "flake-utils_9",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
|
@ -4324,9 +4410,9 @@
|
|||
},
|
||||
"zig": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat_7",
|
||||
"flake-utils": "flake-utils_7",
|
||||
"nixpkgs": "nixpkgs_13"
|
||||
"flake-compat": "flake-compat_8",
|
||||
"flake-utils": "flake-utils_8",
|
||||
"nixpkgs": "nixpkgs_14"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1716725305,
|
||||
|
|
|
@ -118,5 +118,7 @@
|
|||
url = "git+ssh://jacekpoz/jacekpoz/pozsite.git";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,44 +1,74 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.minecraft-server = {
|
||||
}: let
|
||||
inherit (config.myOptions.other.system) username;
|
||||
in {
|
||||
imports = [ inputs.nix-minecraft.nixosModules.minecraft-servers ];
|
||||
nixpkgs.overlays = [ inputs.nix-minecraft.overlay ];
|
||||
|
||||
users.users.${username} = {
|
||||
extraGroups = [ "minecraft" ];
|
||||
};
|
||||
|
||||
services.minecraft-servers = {
|
||||
enable = true;
|
||||
package = pkgs.purpur.overrideAttrs {
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://api.purpurmc.org/v2/purpur/1.20.6/2233/download";
|
||||
hash = "sha256-fVQQqXg2Ckb6p2ooix6rNTE12NsW5AMpoVRALsGxLZE=";
|
||||
};
|
||||
};
|
||||
eula = true;
|
||||
declarative = true;
|
||||
jvmOpts = "";
|
||||
serverProperties = {
|
||||
server-ip = "127.0.0.1";
|
||||
server-port = 2137;
|
||||
difficulty = 3;
|
||||
gamemode = 0;
|
||||
enable-command-block = true;
|
||||
hide-online-players = true;
|
||||
level-name = "swiat";
|
||||
max-players = 4;
|
||||
online-mode = true;
|
||||
snooper-enabled = false;
|
||||
spawn-protection = 0;
|
||||
view-distance = 12;
|
||||
white-list = true;
|
||||
enforce-whitelist = true;
|
||||
};
|
||||
whitelist = {
|
||||
jacekpoz = "8cc45dd9-0145-4068-be30-038a3844ebd0";
|
||||
emo_mruczek = "e62cfed1-4758-488e-ac91-b623a87e0ac9";
|
||||
dataDir = "/var/lib/minecraft";
|
||||
|
||||
servers.celestynow = {
|
||||
enable = true;
|
||||
autoStart = true;
|
||||
openFirewall = true;
|
||||
enableReload = true;
|
||||
|
||||
serverProperties = {
|
||||
server-ip = "127.0.0.1";
|
||||
server-port = 25565;
|
||||
difficulty = 3;
|
||||
gamemode = 0;
|
||||
enable-command-block = true;
|
||||
hide-online-players = true;
|
||||
level-name = "swiat";
|
||||
motd = "dupa";
|
||||
max-players = 4;
|
||||
online-mode = false;
|
||||
snooper-enabled = false;
|
||||
spawn-protection = 0;
|
||||
view-distance = 12;
|
||||
# white-list = true;
|
||||
# enforce-whitelist = true;
|
||||
};
|
||||
# whitelist = {
|
||||
# jacekpoz = "8cc45dd9-0145-4068-be30-038a3844ebd0";
|
||||
# emo_mruczek = "e62cfed1-4758-488e-ac91-b623a87e0ac9";
|
||||
# };
|
||||
|
||||
package = pkgs.vanillaServers.vanilla-1_21;
|
||||
jvmOpts = "-Xms6144M -Xmx8192M";
|
||||
# symlinks = {
|
||||
# mods = pkgs.linkFarmFromDrvs "mods" (builtins.attrValues {
|
||||
# Create-Fabric = pkgs.fetchurl {
|
||||
# url = "https://cdn.modrinth.com/data/Xbc0uyRg/versions/h2HgGyvA/create-fabric-0.5.1-f-build.1417%2Bmc1.20.1.jar";
|
||||
# sha512 = "bc8e3afc219ecf9d475f4b56f421024f76fc20bce941a2c956ecca1e8905b39d946a124aca48cb391a0a60314d68fd5413c8c12d0ad1f605159b10611595878f";
|
||||
# };
|
||||
# Fabric-Api = pkgs.fetchurl {
|
||||
# url = "https://cdn.modrinth.com/data/P7dR8mSH/versions/YG53rBmj/fabric-api-0.92.0%2B1.20.1.jar";
|
||||
# sha512 = "53ce4cb2bb5579cef37154c928837731f3ae0a3821dd2fb4c4401d22d411f8605855e8854a03e65ea4f949dfa0e500ac1661a2e69219883770c6099b0b28e4fa";
|
||||
# };
|
||||
# });
|
||||
# };
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
virtualHosts."mc.jacekpoz.pl".extraConfig = ''
|
||||
reverse_proxy * localhost:2137
|
||||
'';
|
||||
};
|
||||
# services.caddy = {
|
||||
# enable = true;
|
||||
# virtualHosts."mc.jacekpoz.pl:2137".extraConfig = ''
|
||||
# reverse_proxy * localhost:25565
|
||||
# '';
|
||||
# };
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 25565 ];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue