This commit is contained in:
Oliver Davies 2025-06-23 00:14:26 +01:00
parent 5505524dd4
commit 037aabb60f
5 changed files with 70 additions and 79 deletions

View file

@ -11,28 +11,18 @@
flake-parts.lib.mkFlake { inherit inputs; } { flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" ]; systems = [ "x86_64-linux" ];
imports = [
./modules/nodejs.nix
./modules/php82.nix
./modules/php83.nix
./modules/tailwindcss.nix
];
perSystem = perSystem =
{ config, pkgs, ... }: { config, pkgs, ... }:
let
inherit (pkgs) callPackage;
commonPhpPackages = with pkgs; [
phpactor
];
in
{ {
devShells = { devShells.default = pkgs.mkShell {
default = pkgs.mkShell { packages = with pkgs; [ nixd ];
packages = with pkgs; [ nixd ];
};
nodejs = callPackage ./modules/nodejs.nix { };
php82 = callPackage ./modules/php82.nix { inherit commonPhpPackages; };
php83 = callPackage ./modules/php83.nix { inherit commonPhpPackages; };
tailwindcss = callPackage ./modules/tailwindcss.nix { };
}; };
formatter = pkgs.nixfmt-rfc-style; formatter = pkgs.nixfmt-rfc-style;

View file

@ -1,18 +1,20 @@
{ lib, pkgs }: {
perSystem =
{ pkgs, ... }:
{
devShells.nodejs = pkgs.mkShell {
packages = with pkgs; [
bun
eslint_d
nodejs
nodePackages.pnpm
nodePackages.yarn
prettier
];
with pkgs; shellHook = ''
echo "nodejs $(node --version)"
mkShell { '';
packages = [ };
bun };
eslint_d
nodejs
nodePackages.pnpm
nodePackages.yarn
prettier
];
shellHook = ''
echo "nodejs $(${lib.getExe nodejs} --version)"
'';
} }

View file

@ -1,19 +1,17 @@
{ {
commonPhpPackages, perSystem =
lib, { pkgs, ... }:
pkgs, {
... devShells.php82 = pkgs.mkShell {
}: packages = with pkgs; [
php82
php82Packages.composer
phpactor
];
with pkgs; shellHook = ''
php --version
mkShell { '';
packages = [ };
php82 };
php82Packages.composer
] ++ commonPhpPackages;
shellHook = ''
${lib.getExe php82} --version
'';
} }

View file

@ -1,18 +1,17 @@
{ {
commonPhpPackages, perSystem =
lib, { pkgs, ... }:
pkgs, {
}: devShells.php83 = pkgs.mkShell {
packages = with pkgs; [
php83
php83Packages.composer
phpactor
];
with pkgs; shellHook = ''
php --version
mkShell { '';
packages = [ };
php83 };
php83Packages.composer
] ++ commonPhpPackages;
shellHook = ''
${lib.getExe php83} --version
'';
} }

View file

@ -1,15 +1,17 @@
{ lib, pkgs }: {
perSystem =
{ pkgs, ... }:
{
devShells.tailwindcss = pkgs.mkShell {
packages = with pkgs; [
tailwindcss-language-server
tailwindcss_4
watchman
];
with pkgs; shellHook = ''
tailwindcss --help
mkShell { '';
packages = [ };
tailwindcss-language-server };
tailwindcss_4
watchman
];
shellHook = ''
${lib.getExe tailwindcss_4} --help
'';
} }