diff --git a/flake-parts/scripts.nix b/flake-parts/scripts.nix index c2a0782..7308cc4 100644 --- a/flake-parts/scripts.nix +++ b/flake-parts/scripts.nix @@ -10,9 +10,16 @@ { packages = "${self}/scripts" - |> builtins.readDir - |> lib.attrNames - |> lib.map (name: name |> lib.removeSuffix ".nix") - |> self.lib.genAttrs (name: import "${self}/scripts/${name}.nix" { inherit self' pkgs lib; }); + |> lib.filesystem.listFilesRecursive + |> lib.map (file: { + name = + file + |> lib.unsafeDiscardStringContext + |> lib.removePrefix "${self}/scripts/" + |> lib.removeSuffix ".nix" + |> lib.replaceString "/" "-"; + value = import file { inherit self' pkgs lib; }; + }) + |> lib.listToAttrs; }; } diff --git a/scripts/nebula-regen-all-host-certs.nix b/scripts/nebula/regen-all-host-certs.nix similarity index 100% rename from scripts/nebula-regen-all-host-certs.nix rename to scripts/nebula/regen-all-host-certs.nix diff --git a/scripts/nebula-regen-host-cert.nix b/scripts/nebula/regen-host-cert.nix similarity index 100% rename from scripts/nebula-regen-host-cert.nix rename to scripts/nebula/regen-host-cert.nix