2021-12-17 09:25:15 +01:00
|
|
|
|
# Edit this configuration file to define what should be installed on
|
|
|
|
|
# your system. Help is available in the configuration.nix(5) man page
|
|
|
|
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
|
|
|
|
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
imports =
|
|
|
|
|
[ # Include the results of the hardware scan.
|
|
|
|
|
../../hardware-configuration.nix
|
2021-12-18 22:07:27 +01:00
|
|
|
|
|
|
|
|
|
../../base.nix
|
2021-12-17 09:25:15 +01:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
services.minecraft-server = {
|
|
|
|
|
enable = true;
|
|
|
|
|
eula = true;
|
|
|
|
|
package = pkgs.unstable.minecraft-server;
|
|
|
|
|
dataDir = "/run/minecraft"; #"/fast/minecraft";
|
|
|
|
|
jvmOpts = "-Xmx8192M -Xms8192M -XX:+UseG1GC -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nixpkgs.config.packageOverrides = pkgs: {
|
|
|
|
|
unstable = (import <nixos-unstable>) { };
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Use the GRUB 2 boot loader.
|
|
|
|
|
boot.loader.grub.enable = true;
|
|
|
|
|
boot.loader.grub.version = 2;
|
|
|
|
|
# boot.loader.grub.efiSupport = true;
|
|
|
|
|
# boot.loader.grub.efiInstallAsRemovable = true;
|
|
|
|
|
# boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
|
|
|
|
# Define on which hard drive you want to install Grub.
|
|
|
|
|
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
|
|
|
|
|
|
|
|
|
|
networking.hostName = "greddost"; # Define your hostname.
|
|
|
|
|
|
|
|
|
|
networking.interfaces.ens18.useDHCP = true;
|
|
|
|
|
|
|
|
|
|
# Open ports in the firewall.
|
|
|
|
|
networking.firewall.allowedTCPPorts = [ 25565 ];
|
|
|
|
|
networking.firewall.allowedUDPPorts = [ 25565 ];
|
|
|
|
|
|
|
|
|
|
# This value determines the NixOS release from which the default
|
|
|
|
|
# settings for stateful data, like file locations and database versions
|
|
|
|
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
|
|
|
# this value at the release version of the first install of this system.
|
|
|
|
|
# Before changing this value read the documentation for this option
|
|
|
|
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
|
|
|
system.stateVersion = "21.11"; # Did you read the comment?
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|