will continue on other host

This commit is contained in:
William 2025-06-02 19:02:39 -03:00
parent f5adb9d6d7
commit 40e311e5e4
4 changed files with 121 additions and 27 deletions

116
flake.lock generated
View file

@ -68,27 +68,6 @@
}
},
"disko": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1736864502,
"narHash": "sha256-ItkIZyebGvNH2dK9jVGzJHGPtb6BSWLN8Gmef16NeY0=",
"owner": "nix-community",
"repo": "disko",
"rev": "0141aabed359f063de7413f80d906e1d98c0c123",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "v1.11.0",
"repo": "disko",
"type": "github"
}
},
"disko-stable": {
"inputs": {
"nixpkgs": [
"nixpkgs-stable"
@ -125,6 +104,40 @@
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -219,13 +232,33 @@
"type": "github"
}
},
"nix-minecraft": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1748570485,
"narHash": "sha256-oDnEc/rxyDf+uUXO56Z2TJtrrQoBe0Z4MCIRaY6lVZ0=",
"owner": "Infinidoge",
"repo": "nix-minecraft",
"rev": "6c961ee42ff2301ee61c75aa42cbe8c8adecf3c8",
"type": "github"
},
"original": {
"owner": "Infinidoge",
"repo": "nix-minecraft",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1747744144,
"narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=",
"lastModified": 1742889210,
"narHash": "sha256-hw63HnwnqU3ZQfsMclLhMvOezpM7RSB0dMAtD5/sOiw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f",
"rev": "698214a32beb4f4c8e3942372c694f40848b360d",
"type": "github"
},
"original": {
@ -251,17 +284,33 @@
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1747744144,
"narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"agenix": "agenix",
"deploy-rs": "deploy-rs",
"disko": "disko",
"disko-stable": "disko-stable",
"home-manager": "home-manager_2",
"home-manager-stable": "home-manager-stable",
"impermanence": "impermanence",
"nix-flatpak": "nix-flatpak",
"nixpkgs": "nixpkgs",
"nix-minecraft": "nix-minecraft",
"nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable"
}
},
@ -295,6 +344,21 @@
"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"
}
},
"utils": {
"inputs": {
"systems": "systems_2"

View file

@ -89,9 +89,11 @@
}
];
serverModules = [
{
nixpkgs.overlays = [
self.overlays.serverOverlay
];
}
];
typeModules = if type == "server" then serverModules else workstationModules;
allModules = defaultModules ++ typeModules ++ extraModules;
@ -123,7 +125,14 @@
hostname = "trantor";
type = "server";
system = "aarch64-linux";
extraModules = [ nix-minecraft.nixosModules.default ];
extraModules = [
nix-minecraft.nixosModules.minecraft-servers
{
nixpkgs.overlays = [
nix-minecraft.overlays.default
];
}
];
};
};

View file

@ -6,5 +6,6 @@
./disko.nix
./hardware-configuration.nix
./networking.nix
./minecraft.nix
];
}

View file

@ -0,0 +1,20 @@
{ pkgs, ... }:
{
services.minecraft-server = {
enable = true;
eula = true;
servers.fabric = {
enable = true;
package = pkgs.fabricServers.fabric-1_21_5;
openFirewall = true;
serverProperties = {
server-port = 25566;
difficulty = "hard";
gamemode = "survival";
white-list = true;
motd = "Servidor dos primos";
};
};
};
}