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
[*]
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

1
.gitignore vendored
View file

@ -8,6 +8,7 @@
storage/framework/*
/.idea
/nbproject
/.direnv
node_modules
*.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
];
}