flake: Initialise new repository
This commit is contained in:
commit
1eb25ada72
41 changed files with 1657 additions and 0 deletions
36
modules/nixos/minecraft.nix
Normal file
36
modules/nixos/minecraft.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
containers.minecraft = {
|
||||
autoStart = true;
|
||||
|
||||
bindMounts = {
|
||||
"/var/lib/minecraft" = {
|
||||
hostPath = "/mnt/sdb1/minecraft";
|
||||
isReadOnly = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
nixpkgs.config.allowUnfreePredicate =
|
||||
pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
"minecraft-server"
|
||||
];
|
||||
|
||||
services = {
|
||||
minecraft-server = {
|
||||
enable = true;
|
||||
eula = true;
|
||||
};
|
||||
|
||||
tailscale = {
|
||||
enable = true;
|
||||
useRoutingFeatures = "server";
|
||||
interfaceName = "userspace-networking";
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue