1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-25 02:22:36 +01:00

nix: add flake with dev shell

This commit is contained in:
Matthew Penner 2022-10-24 09:48:30 -06:00
parent e49ba65709
commit d31ece1c75
No known key found for this signature in database
5 changed files with 90 additions and 5 deletions

View File

@ -1,15 +1,17 @@
root = true root = true
[*] [*]
end_of_line = lf
insert_final_newline = true
indent_style = space indent_style = space
indent_size = 4 indent_size = 4
tab_width = 4
end_of_line = lf
charset = utf-8 charset = utf-8
trim_trailing_whitespace = true trim_trailing_whitespace = true
insert_final_newline = true
[*.yml]
indent_size = 2
[*.md] [*.md]
trim_trailing_whitespace = false trim_trailing_whitespace = false
[*.{md,nix,yml,yaml}]
indent_size = 2
tab_width = 2

1
.gitignore vendored
View File

@ -8,6 +8,7 @@
storage/framework/* storage/framework/*
/.idea /.idea
/nbproject /nbproject
/.direnv
node_modules node_modules
*.log *.log

43
flake.lock Normal file
View File

@ -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
}

22
flake.nix Normal file
View File

@ -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;};
}
);
}

17
shell.nix Normal file
View File

@ -0,0 +1,17 @@
{pkgs ? import <nixpkgs> {}}:
with pkgs;
mkShell rec {
buildInputs = [
alejandra
(php81.buildEnv {
extensions = ({ enabled, all }: enabled ++ (with all; [
redis
xdebug
]));
extraConfig = ''
xdebug.mode=debug
'';
})
php81Packages.composer
];
}