From 4880ce65aeb30ea6300d471d4f0c715ad0a51590 Mon Sep 17 00:00:00 2001 From: Ranomier <> Date: Sun, 4 May 2025 18:19:00 +0200 Subject: [PATCH] feat: add luanti server and host --- hosts/game-luanti/default.nix | 41 ++++++++++++++++++++ hosts/game-luanti/hardware-configuration.nix | 6 +++ modules/game/server/luanti/default.nix | 5 +++ outputs.nix | 1 + 4 files changed, 53 insertions(+) create mode 100644 hosts/game-luanti/default.nix create mode 100644 hosts/game-luanti/hardware-configuration.nix create mode 100644 modules/game/server/luanti/default.nix diff --git a/hosts/game-luanti/default.nix b/hosts/game-luanti/default.nix new file mode 100644 index 0000000..4966862 --- /dev/null +++ b/hosts/game-luanti/default.nix @@ -0,0 +1,41 @@ +{ + pkgs, + lib, + modulesPath, + ... +}: { + # 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 = "25.05"; # Did you read the comment? + + nixpkgs.config = { + # Disable if you don't want unfree packages + allowUnfree = true; + }; + nix.settings.experimental-features = ["nix-command" "flakes"]; + + # https://lix.systems/ Lix is a modern, delicious implementation of the Nix package manager, + # focused on correctness, usability, and growth – + # and committed to doing right by its community. + nix.package = pkgs.lix; + + imports = [ + ./hardware-configuration.nix + + ../../modules/locale.nix + + ../../system_profiles/mini.nix + { + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.ens18.useDHCP = lib.mkDefault true; + } + ]; +} diff --git a/hosts/game-luanti/hardware-configuration.nix b/hosts/game-luanti/hardware-configuration.nix new file mode 100644 index 0000000..1a421a1 --- /dev/null +++ b/hosts/game-luanti/hardware-configuration.nix @@ -0,0 +1,6 @@ +{ + lib, + ... +}: { + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} diff --git a/modules/game/server/luanti/default.nix b/modules/game/server/luanti/default.nix new file mode 100644 index 0000000..06628ea --- /dev/null +++ b/modules/game/server/luanti/default.nix @@ -0,0 +1,5 @@ +{...}: { + services.minetest = { + enable = true; + }; +} diff --git a/outputs.nix b/outputs.nix index 5f28acf..e7e3299 100644 --- a/outputs.nix +++ b/outputs.nix @@ -19,6 +19,7 @@ in { # to add more append // (host_helper example); nixosConfigurations = builtins.mapAttrs (hostName: hostOptions: (hostHelper hostName hostOptions)) { crocoite = {}; + game-luanti = {unstable = true;}; }; # Your custom packages