Infini-DL360/drasl: init

This commit is contained in:
Infinidoge 2025-06-21 00:59:39 -04:00
parent f01976af75
commit d481d06e6e
Signed by: Infinidoge
SSH key fingerprint: SHA256:EMoPe5e2dO0gEvtBb2xkZTz5dkyL0rBmuiGTKG5s96E
4 changed files with 113 additions and 0 deletions

43
flake.lock generated
View file

@ -130,6 +130,27 @@
"type": "github" "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": { "complement": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -263,6 +284,27 @@
"type": "github" "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": { "fenix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -901,6 +943,7 @@
"conduwuit": "conduwuit", "conduwuit": "conduwuit",
"devshell": "devshell", "devshell": "devshell",
"disko": "disko", "disko": "disko",
"drasl": "drasl",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"flake-registry": "flake-registry", "flake-registry": "flake-registry",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",

View file

@ -48,6 +48,7 @@
## Minecraft ## Minecraft
nix-minecraft.url = "github:Infinidoge/nix-minecraft"; nix-minecraft.url = "github:Infinidoge/nix-minecraft";
drasl.url = "github:unmojang/drasl";
## Rust ## Rust
rust-overlay.url = "github:oxalica/rust-overlay"; rust-overlay.url = "github:oxalica/rust-overlay";
@ -100,6 +101,7 @@
conduwuit.inputs.nixpkgs.follows = "nixpkgs"; conduwuit.inputs.nixpkgs.follows = "nixpkgs";
devshell.inputs.nixpkgs.follows = "nixpkgs"; devshell.inputs.nixpkgs.follows = "nixpkgs";
disko.inputs.nixpkgs.follows = "nixpkgs"; disko.inputs.nixpkgs.follows = "nixpkgs";
drasl.inputs.nixpkgs.follows = "nixpkgs";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs"; flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
flake-utils.inputs.systems.follows = "systems"; flake-utils.inputs.systems.follows = "systems";
git-hooks.inputs.flake-compat.follows = "blank"; git-hooks.inputs.flake-compat.follows = "blank";
@ -254,6 +256,7 @@
inputs.lix-module.nixosModules.default inputs.lix-module.nixosModules.default
inputs.hydra.nixosModules.overlayNixpkgsForThisHydra inputs.hydra.nixosModules.overlayNixpkgsForThisHydra
inputs.nix-minecraft.nixosModules.minecraft-servers inputs.nix-minecraft.nixosModules.minecraft-servers
inputs.drasl.nixosModules.drasl
] ++ (self.lib.leaves ./modules); ] ++ (self.lib.leaves ./modules);
}) (self.lib.flattenLeaves ./hosts); }) (self.lib.flattenLeaves ./hosts);

View file

@ -13,6 +13,7 @@
private.nixosModules.minecraft-servers private.nixosModules.minecraft-servers
./authentik.nix ./authentik.nix
./conduwuit.nix ./conduwuit.nix
./drasl.nix
./factorio.nix ./factorio.nix
./forgejo.nix ./forgejo.nix
./freshrss.nix ./freshrss.nix

View 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}";
};
}