feat: Scaffold the nixos modules
The modules themselves don't work yet, but the flake does ! Yay ! (that was way too complicated wtf)
This commit is contained in:
parent
795019f467
commit
6fbd9b2a6c
6 changed files with 282 additions and 42 deletions
51
flake.nix
51
flake.nix
|
@ -1,52 +1,19 @@
|
|||
{
|
||||
description = "A production ready configuration of the pterodactyl game server panel";
|
||||
description = "Nixos modules for the pterodactyl game server panel";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs }: let
|
||||
forAllSystems = nixpkgs.lib.genAttrs [
|
||||
"x86_64-linux"
|
||||
];
|
||||
in {
|
||||
packages = forAllSystems (system: let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
|
||||
panel = let
|
||||
version = "";
|
||||
in pkgs.fetchzip {
|
||||
url = "https://github.com/pterodactyl/panel/releases/download/v${ version }/panel.tar.gz";
|
||||
hash = "sha256-0nOHtReVUVXYQY/glS4x0gkbhetoXSWg4rRwOJlkcM8=";
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
php = pkgs.php81.buildEnv {
|
||||
extensions = { enabled, all, }: enabled ++ (with all; [
|
||||
redis
|
||||
]);
|
||||
};
|
||||
|
||||
wings = pkgs.buildGoModule rec {
|
||||
pname = "pterodactyl-wings";
|
||||
version = "1.11.13";
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "pterodactyl";
|
||||
repo = "wings";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-UpYUHWM2J8nH+srdKSpFQEaPx2Rj2+YdphV8jJXcoBU=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-eWfQE9cQ7zIkITWwnVu9Sf9vVFjkQih/ZW77d6p/Iw0=";
|
||||
subPackages = [ "." ];
|
||||
|
||||
ldflags = [
|
||||
"-X github.com/pterodactyl/wings/system.Version=${version}"
|
||||
];
|
||||
};
|
||||
outputs = { self, nixpkgs }: {
|
||||
nixosModules = nixpkgs.lib.genAttrs [ "pterodactyl" ] (
|
||||
module: import ./modules/${module}.nix { flake = self; }
|
||||
);
|
||||
|
||||
packages = nixpkgs.lib.genAttrs [ "x86_64-linux" ] (
|
||||
system: nixpkgs.lib.genAttrs [ "pterodactyl" "php" "wings" ] (
|
||||
package: import ./packages/${package}.nix { pkgs = import nixpkgs { inherit system; }; };
|
||||
)
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue