diff --git a/.editorconfig b/.editorconfig index c70b7be22..a04147116 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,15 +1,17 @@ root = true [*] -end_of_line = lf -insert_final_newline = true indent_style = space indent_size = 4 +tab_width = 4 +end_of_line = lf charset = utf-8 trim_trailing_whitespace = true - -[*.yml] -indent_size = 2 +insert_final_newline = true [*.md] trim_trailing_whitespace = false + +[*.{md,nix,yml,yaml}] +indent_size = 2 +tab_width = 2 diff --git a/.gitignore b/.gitignore index cf911a1de..4b5d02246 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ storage/framework/* /.idea /nbproject +/.direnv node_modules *.log diff --git a/flake.lock b/flake.lock new file mode 100644 index 000000000..4a64ac964 --- /dev/null +++ b/flake.lock @@ -0,0 +1,43 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1666539104, + "narHash": "sha256-jeuC+d375wHHxMOFLgu7etseCQVJuPNKoEc9X9CsErg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0e6df35f39651504249a05191f9a78d251707e22", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 000000000..050cc2415 --- /dev/null +++ b/flake.nix @@ -0,0 +1,22 @@ +{ + description = "Pterodactyl Panel"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { + self, + nixpkgs, + flake-utils, + ... + }: + flake-utils.lib.eachDefaultSystem ( + system: let + pkgs = import nixpkgs {inherit system;}; + in { + devShell = import ./shell.nix {inherit pkgs;}; + } + ); +} diff --git a/shell.nix b/shell.nix new file mode 100644 index 000000000..afe21af5e --- /dev/null +++ b/shell.nix @@ -0,0 +1,17 @@ +{pkgs ? import {}}: +with pkgs; + mkShell rec { + buildInputs = [ + alejandra + (php81.buildEnv { + extensions = ({ enabled, all }: enabled ++ (with all; [ + redis + xdebug + ])); + extraConfig = '' + xdebug.mode=debug + ''; + }) + php81Packages.composer + ]; + }