Add initial dev shells
This commit is contained in:
commit
c12dcc81fa
6 changed files with 90 additions and 0 deletions
1
.envrc
Normal file
1
.envrc
Normal file
|
@ -0,0 +1 @@
|
|||
use flake
|
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1750365781,
|
||||
"narHash": "sha256-XE/lFNhz5lsriMm/yjXkvSZz5DfvKJLUjsS6pP8EC50=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "08f22084e6085d19bcfb4be30d1ca76ecb96fe54",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
31
flake.nix
Normal file
31
flake.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
outputs =
|
||||
{ nixpkgs, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
|
||||
inherit (pkgs) callPackage;
|
||||
|
||||
commonPhpPackages = with pkgs; [
|
||||
phpactor
|
||||
];
|
||||
in
|
||||
{
|
||||
devShells.${system} = {
|
||||
default = pkgs.mkShell {
|
||||
packages = with pkgs; [ nixd ];
|
||||
};
|
||||
|
||||
nodejs = callPackage ./modules/nodejs.nix { };
|
||||
|
||||
php82 = callPackage ./modules/php82.nix { inherit commonPhpPackages; };
|
||||
|
||||
php83 = callPackage ./modules/php83.nix { inherit commonPhpPackages; };
|
||||
};
|
||||
|
||||
formatter.${system} = pkgs.nixfmt-rfc-style;
|
||||
};
|
||||
}
|
9
modules/nodejs.nix
Normal file
9
modules/nodejs.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
nodejs
|
||||
nodePackages.pnpm
|
||||
nodePackages.yarn
|
||||
];
|
||||
}
|
11
modules/php82.nix
Normal file
11
modules/php82.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ commonPhpPackages, pkgs, ... }:
|
||||
|
||||
pkgs.mkShell {
|
||||
packages =
|
||||
with pkgs;
|
||||
[
|
||||
php82
|
||||
php82Packages.composer
|
||||
]
|
||||
++ commonPhpPackages;
|
||||
}
|
11
modules/php83.nix
Normal file
11
modules/php83.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ commonPhpPackages, pkgs }:
|
||||
|
||||
pkgs.mkShell {
|
||||
packages =
|
||||
with pkgs;
|
||||
[
|
||||
php83
|
||||
php83Packages.composer
|
||||
]
|
||||
++ commonPhpPackages;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue