diff --git a/flake.nix b/flake.nix index 428cd3e..4e5b238 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,10 @@ flake-parts.lib.mkFlake { inherit inputs; } { systems = [ "x86_64-linux" ]; + _module.args = { + commonPhpPackages = pkgs: with pkgs; [ phpactor ]; + }; + imports = [ ./modules/nodejs.nix ./modules/php74.nix diff --git a/modules/php74.nix b/modules/php74.nix index 6f73a4c..97cf5ea 100644 --- a/modules/php74.nix +++ b/modules/php74.nix @@ -1,4 +1,4 @@ -{ inputs, ... }: +{ commonPhpPackages, inputs, ... }: { perSystem = @@ -11,11 +11,10 @@ in { devShells.php74 = pkgs.mkShell { - packages = with pkgs; [ + packages = [ php phpPackages.composer - phpactor - ]; + ] ++ commonPhpPackages pkgs; shellHook = '' php --version diff --git a/modules/php81.nix b/modules/php81.nix index 37d0e2b..cdf3920 100644 --- a/modules/php81.nix +++ b/modules/php81.nix @@ -1,3 +1,5 @@ +{ commonPhpPackages, ... }: + { perSystem = { pkgs, ... }: @@ -6,8 +8,7 @@ packages = with pkgs; [ php81 php81Packages.composer - phpactor - ]; + ] ++ commonPhpPackages pkgs; shellHook = '' php --version diff --git a/modules/php82.nix b/modules/php82.nix index b70488a..9f0c99e 100644 --- a/modules/php82.nix +++ b/modules/php82.nix @@ -1,3 +1,5 @@ +{ commonPhpPackages, ... }: + { perSystem = { pkgs, ... }: @@ -6,8 +8,7 @@ packages = with pkgs; [ php82 php82Packages.composer - phpactor - ]; + ] ++ commonPhpPackages pkgs; shellHook = '' php --version diff --git a/modules/php83.nix b/modules/php83.nix index 5bcf12a..4bab816 100644 --- a/modules/php83.nix +++ b/modules/php83.nix @@ -1,3 +1,5 @@ +{ commonPhpPackages, ... }: + { perSystem = { pkgs, ... }: @@ -6,8 +8,7 @@ packages = with pkgs; [ php83 php83Packages.composer - phpactor - ]; + ] ++ commonPhpPackages pkgs; shellHook = '' php --version