Skip to content

Commit 5caa082

Browse files
committed
fix nixos-shell-config option not beeing accessible
The check if nixos-shell is already included actually broke evaluation if a user was trying to use options.nixos-shell. By using non-anymous inputs, hopefully we can avoid including the same module twice (tm).
1 parent 44ce07e commit 5caa082

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

share/nixos-shell.nix

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
let
1010
lib = flake.inputs.nixpkgs.lib or (import nixpkgs { }).lib;
1111

12-
nixos-shell = import ./modules/nixos-shell.nix;
13-
nixos-shell-config = import ./modules/nixos-shell-config.nix;
14-
1512
defaultTo = default: e: if e == null then default else e;
1613

1714
getFlakeOutput = path: lib.attrByPath path null flake.outputs;
@@ -20,8 +17,8 @@ let
2017
inherit system;
2118
modules = [
2219
config
23-
nixos-shell
24-
nixos-shell-config
20+
./modules/nixos-shell.nix
21+
./modules/nixos-shell-config.nix
2522
];
2623
};
2724

@@ -33,11 +30,10 @@ let
3330

3431
flakeModule = getFlakeOutput [ "nixosModules" "${flakeAttr}" ];
3532

36-
nixosShellModules =
37-
if flakeSystem ? options.nixos-shell then
38-
[ nixos-shell-config ]
39-
else
40-
[ nixos-shell nixos-shell-config ];
33+
nixosShellModules = [
34+
./modules/nixos-shell.nix
35+
./modules/nixos-shell-config.nix
36+
];
4137
in
4238
if flakeUri != null then
4339
if flakeSystem != null then

0 commit comments

Comments
 (0)