Skip to content

Commit d31ece1

Browse files
committed
nix: add flake with dev shell
1 parent e49ba65 commit d31ece1

File tree

5 files changed

+90
-5
lines changed

5 files changed

+90
-5
lines changed

.editorconfig

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
root = true
22

33
[*]
4-
end_of_line = lf
5-
insert_final_newline = true
64
indent_style = space
75
indent_size = 4
6+
tab_width = 4
7+
end_of_line = lf
88
charset = utf-8
99
trim_trailing_whitespace = true
10-
11-
[*.yml]
12-
indent_size = 2
10+
insert_final_newline = true
1311

1412
[*.md]
1513
trim_trailing_whitespace = false
14+
15+
[*.{md,nix,yml,yaml}]
16+
indent_size = 2
17+
tab_width = 2

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
storage/framework/*
99
/.idea
1010
/nbproject
11+
/.direnv
1112

1213
node_modules
1314
*.log

flake.lock

+43
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
description = "Pterodactyl Panel";
3+
4+
inputs = {
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
6+
flake-utils.url = "github:numtide/flake-utils";
7+
};
8+
9+
outputs = {
10+
self,
11+
nixpkgs,
12+
flake-utils,
13+
...
14+
}:
15+
flake-utils.lib.eachDefaultSystem (
16+
system: let
17+
pkgs = import nixpkgs {inherit system;};
18+
in {
19+
devShell = import ./shell.nix {inherit pkgs;};
20+
}
21+
);
22+
}

shell.nix

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{pkgs ? import <nixpkgs> {}}:
2+
with pkgs;
3+
mkShell rec {
4+
buildInputs = [
5+
alejandra
6+
(php81.buildEnv {
7+
extensions = ({ enabled, all }: enabled ++ (with all; [
8+
redis
9+
xdebug
10+
]));
11+
extraConfig = ''
12+
xdebug.mode=debug
13+
'';
14+
})
15+
php81Packages.composer
16+
];
17+
}

0 commit comments

Comments
 (0)