Infini-DL360/drasl: init
This commit is contained in:
parent
f01976af75
commit
d481d06e6e
4 changed files with 113 additions and 0 deletions
43
flake.lock
generated
43
flake.lock
generated
|
@ -130,6 +130,27 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"buildNodeModules": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"drasl",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1707354861,
|
||||
"narHash": "sha256-L10H5hh9S6y20c7AKuKJ2h9BczODqpTCoGEZBDPJhd0=",
|
||||
"owner": "adisbladis",
|
||||
"repo": "buildNodeModules",
|
||||
"rev": "76c7c56dd9dcea355a8e2ebd0f228a8f2d1e1ee8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "adisbladis",
|
||||
"repo": "buildNodeModules",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"complement": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -263,6 +284,27 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"drasl": {
|
||||
"inputs": {
|
||||
"buildNodeModules": "buildNodeModules",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1745600873,
|
||||
"narHash": "sha256-pVUWppj3u0qOa1G06X/2ettNHmTsl01TrjTh8y18ZGw=",
|
||||
"owner": "unmojang",
|
||||
"repo": "drasl",
|
||||
"rev": "8ff0a07efc4fb8ab2a0509407caccbd16934661d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "unmojang",
|
||||
"repo": "drasl",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"fenix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -901,6 +943,7 @@
|
|||
"conduwuit": "conduwuit",
|
||||
"devshell": "devshell",
|
||||
"disko": "disko",
|
||||
"drasl": "drasl",
|
||||
"flake-parts": "flake-parts",
|
||||
"flake-registry": "flake-registry",
|
||||
"flake-utils": "flake-utils",
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
|
||||
## Minecraft
|
||||
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
|
||||
drasl.url = "github:unmojang/drasl";
|
||||
|
||||
## Rust
|
||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||
|
@ -100,6 +101,7 @@
|
|||
conduwuit.inputs.nixpkgs.follows = "nixpkgs";
|
||||
devshell.inputs.nixpkgs.follows = "nixpkgs";
|
||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
drasl.inputs.nixpkgs.follows = "nixpkgs";
|
||||
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||
flake-utils.inputs.systems.follows = "systems";
|
||||
git-hooks.inputs.flake-compat.follows = "blank";
|
||||
|
@ -254,6 +256,7 @@
|
|||
inputs.lix-module.nixosModules.default
|
||||
inputs.hydra.nixosModules.overlayNixpkgsForThisHydra
|
||||
inputs.nix-minecraft.nixosModules.minecraft-servers
|
||||
inputs.drasl.nixosModules.drasl
|
||||
] ++ (self.lib.leaves ./modules);
|
||||
}) (self.lib.flattenLeaves ./hosts);
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
private.nixosModules.minecraft-servers
|
||||
./authentik.nix
|
||||
./conduwuit.nix
|
||||
./drasl.nix
|
||||
./factorio.nix
|
||||
./forgejo.nix
|
||||
./freshrss.nix
|
||||
|
|
66
hosts/Infini-DL360/drasl.nix
Normal file
66
hosts/Infini-DL360/drasl.nix
Normal file
|
@ -0,0 +1,66 @@
|
|||
# I personally bought Minecraft twice
|
||||
# My friends all own or have owned Minecraft
|
||||
# But sometimes people don't want to use Mojang/Microsoft's servers
|
||||
# This is for that
|
||||
{
|
||||
common,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.services.drasl;
|
||||
domain = common.subdomain "drasl";
|
||||
|
||||
Mojang = {
|
||||
Nickname = "Mojang";
|
||||
SessionURL = "https://sessionserver.mojang.com";
|
||||
AccountURL = "https://api.mojang.com";
|
||||
};
|
||||
in
|
||||
|
||||
{
|
||||
services.drasl = {
|
||||
enable = true;
|
||||
settings = {
|
||||
Domain = domain;
|
||||
BaseURL = "https://${domain}";
|
||||
ListenAddress = "127.0.0.1:27585";
|
||||
DefaultAdmins = [ "Infinidoge" ];
|
||||
InstanceName = "INX Drasl";
|
||||
ApplicationOwner = "INX";
|
||||
|
||||
AllowAddingDeletingPlayers = true;
|
||||
AllowChangingPlayerName = true;
|
||||
DefaultMaxPlayerCount = 3;
|
||||
CreateNewPlayer.AllowChoosingUUID = true;
|
||||
RegistrationNewPlayer = {
|
||||
Allow = true;
|
||||
RequireInvite = true;
|
||||
};
|
||||
RegistrationExistingPlayer = {
|
||||
Allow = true;
|
||||
RequireInvite = true;
|
||||
};
|
||||
|
||||
FallbackAPIServers = [
|
||||
(
|
||||
Mojang
|
||||
// {
|
||||
ServicesURL = "https://api.minecraftservices.com";
|
||||
SkinDomains = [ "textures.minecraft.net" ];
|
||||
CacheTTLSeconds = 60;
|
||||
}
|
||||
)
|
||||
];
|
||||
|
||||
ImportExistingPlayer = Mojang // {
|
||||
Allow = true;
|
||||
SetSkinURL = "https://www.minecraft.net/msaprofile/mygames/editskin";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts.${domain} = common.nginx.ssl-inx // {
|
||||
locations."/".proxyPass = "http://${cfg.settings.ListenAddress}";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue