Skip to content

Commit

Permalink
fix(autowiring): Allow directory only if default.nix exists
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Oct 6, 2024
1 parent ed937a0 commit bf66125
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions nix/modules/flake-parts/autowire.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{ self, lib, ... }:
let
in
{
config =
let
Expand All @@ -12,7 +10,7 @@ in
if type == "regular" then
let name = lib.removeSuffix ".nix" fn; in
lib.nameValuePair name (f "${dir}/${fn}")
else if type == "directory" then
else if type == "directory" && builtins.pathExists "${dir}/${fn}/default.nix" then
lib.nameValuePair fn (f "${dir}/${fn}")
else
null
Expand Down

0 comments on commit bf66125

Please sign in to comment.