diff --git a/modules/devShells.nix b/modules/devShells.nix
index 28e28a7..6ca058f 100644
--- a/modules/devShells.nix
+++ b/modules/devShells.nix
@@ -9,6 +9,7 @@ let
;
inherit (flake-modules-core-lib)
mkSubmoduleOptions
+ mkPerSystemOption
;
in
{
@@ -23,6 +24,20 @@ in
'';
};
};
+
+ perSystem = mkPerSystemOption
+ ({ config, system, ... }: {
+ options = {
+ devShells = mkOption {
+ type = types.lazyAttrsOf types.package;
+ default = { };
+ description = ''
+ An attribute set of packages to be built by nix develop .#<name>.
+ nix build .#<name> will run devShells.<name>.
+ '';
+ };
+ };
+ });
};
config = {
flake.devShells =
@@ -37,19 +52,5 @@ in
optionalAttrs (flake?devShells.${system}) {
devShells = flake.devShells.${system};
};
-
- perSystem = system: { config, ... }: {
- _file = ./devShells.nix;
- options = {
- devShells = mkOption {
- type = types.lazyAttrsOf types.package;
- default = { };
- description = ''
- An attribute set of packages to be built by nix develop .#<name>.
- nix build .#<name> will run devShells.<name>.
- '';
- };
- };
- };
};
}