Skip to content

Commit

Permalink
nix: add flake with dev shell
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewpi committed Oct 24, 2022
1 parent e49ba65 commit d31ece1
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -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 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
storage/framework/*
/.idea
/nbproject
/.direnv

node_modules
*.log
Expand Down
43 changes: 43 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -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 changes: 17 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -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
];
}

0 comments on commit d31ece1

Please sign in to comment.