feat: add luanti server
This commit is contained in:
parent
ddf8154933
commit
6922232ec5
6 changed files with 55 additions and 6 deletions
11
hosts/game-luanti/boot.nix
Normal file
11
hosts/game-luanti/boot.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
# Use the GRUB 2 boot loader.
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
# efiSupport = true;
|
||||
# efiInstallAsRemovable = true;
|
||||
# Define on which hard drive you want to install Grub.
|
||||
device = "/dev/vda"; # or "nodev" for efi only
|
||||
};
|
||||
# boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||
}
|
|
@ -1,16 +1,21 @@
|
|||
{
|
||||
imports = [
|
||||
./boot.nix
|
||||
./hardware-configuration.nix
|
||||
|
||||
../../system_profiles/defaults.nix
|
||||
../../system_profiles/mini-container.nix
|
||||
../../system_profiles/mini.nix
|
||||
../../system_profiles/server.nix
|
||||
|
||||
../../modules/game/server/luanti
|
||||
../../modules/sec_auth/ssh-server.nix
|
||||
];
|
||||
|
||||
users = let
|
||||
username = "root";
|
||||
in {
|
||||
users."${username}".openssh.authorizedKeys.keyFiles = [
|
||||
/etc/nixos/ssh/authorized_keys.d/${username}
|
||||
../../certificates/id_ed25519_game-luanti.pub
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,5 +1,20 @@
|
|||
{...}: {
|
||||
services.minetest = {
|
||||
{pkgs, ...}: let
|
||||
port = 10523;
|
||||
in {
|
||||
services.minetest-server = {
|
||||
enable = true;
|
||||
|
||||
gameId = "asuna";
|
||||
port = port;
|
||||
};
|
||||
|
||||
# open port since luanti does not do it by itself
|
||||
networking.firewall = {
|
||||
allowedUDPPorts = [port];
|
||||
};
|
||||
|
||||
# install luanti seperatly so it is available through the command line
|
||||
environment.systemPackages = with pkgs; [
|
||||
luanti
|
||||
];
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
services.openssh = {
|
||||
enable = true;
|
||||
|
||||
ports = lib.mkDefault [38742];
|
||||
ports = lib.mkDefault [10522];
|
||||
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/profiles/minimal.nix")
|
||||
(modulesPath + "/profiles/perlless.nix")
|
||||
#(modulesPath + "/profiles/perlless.nix")
|
||||
|
||||
{
|
||||
environment.defaultPackages = lib.mkDefault [];
|
||||
|
|
18
system_profiles/server.nix
Normal file
18
system_profiles/server.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
imports = let
|
||||
packages = {pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
tmux
|
||||
wget
|
||||
];
|
||||
};
|
||||
in [
|
||||
./defaults.nix
|
||||
./mini.nix
|
||||
|
||||
../modules/customisation.nix
|
||||
../modules/software/neovim.nix
|
||||
|
||||
packages
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue