feat(minecraft01): init
This commit is contained in:
parent
6d09d3a0b3
commit
fd302adf08
6 changed files with 96 additions and 0 deletions
16
machines/minecraft01/_configuration.nix
Normal file
16
machines/minecraft01/_configuration.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ lib, ... }:
|
||||
|
||||
lib.extra.mkConfig {
|
||||
enabledModules = [
|
||||
# List of modules to enable
|
||||
];
|
||||
|
||||
enabledServices = [
|
||||
# List of services to enable
|
||||
"minecraft"
|
||||
];
|
||||
|
||||
extraConfig = { };
|
||||
|
||||
root = ./.;
|
||||
}
|
38
machines/minecraft01/_hardware-configuration.nix
Normal file
38
machines/minecraft01/_hardware-configuration.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{ lib, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||
|
||||
boot = {
|
||||
loader.systemd-boot.enable = true;
|
||||
initrd.kernelModules = [ ];
|
||||
kernelModules = [ ];
|
||||
extraModulePackages = [ ];
|
||||
initrd.availableKernelModules = [
|
||||
"ata_piix"
|
||||
"uhci_hcd"
|
||||
"virtio_pci"
|
||||
"virtio_scsi"
|
||||
"sd_mod"
|
||||
"sr_mod"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/c36ca087-a08f-4a1a-a28f-6ab044b84036";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/1759-C39E";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
];
|
||||
};
|
||||
|
||||
networking.useDHCP = lib.mkDefault false;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
16
machines/minecraft01/minecraft.nix
Normal file
16
machines/minecraft01/minecraft.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.minecraft-server = {
|
||||
enable = true;
|
||||
eula = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
systemd.services.minecraft-server.serviceConfig.ExecStart = lib.mkForce ''
|
||||
${pkgs.jre_headless}/bin/java -Xmx9G -jar ${config.services.minecraft-server.dataDir}/server.jar nogui
|
||||
'';
|
||||
}
|
3
machines/minecraft01/secrets/secrets.nix
Normal file
3
machines/minecraft01/secrets/secrets.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
(import ../../../keys).mkSecrets [ "minecraft01" ] [
|
||||
# List of secrets for minecraft01
|
||||
]
|
|
@ -112,6 +112,21 @@ in
|
|||
|
||||
hostId = "4a370ef4";
|
||||
};
|
||||
|
||||
minecraft01 = {
|
||||
interfaces.ens18 = {
|
||||
ipv4 = [
|
||||
{
|
||||
address = "129.199.146.46";
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
gateways = [ "129.199.146.254" ];
|
||||
enableDefaultDNS = true;
|
||||
};
|
||||
hostId = "f0b2c1cd";
|
||||
};
|
||||
|
||||
router02 = {
|
||||
interfaces = { };
|
||||
|
||||
|
|
|
@ -72,6 +72,14 @@ in
|
|||
stateVersion = "24.05";
|
||||
nixpkgs = "24.05";
|
||||
};
|
||||
minecraft01 = {
|
||||
site = "pav01";
|
||||
|
||||
hashedPassword = "$y$j9T$PK0/EpPoPNwCa8aDb/Zfb0$X2Q.QaoDa8WP4sxt7ubwdbxSdDZxJ1.jQWHaT18iZpD";
|
||||
|
||||
stateVersion = "24.11";
|
||||
nixpkgs = "unstable";
|
||||
};
|
||||
photo01 = {
|
||||
site = "pav01";
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue