mirror of
https://github.com/daylinmorgan/oizys.git
synced 2025-02-02 15:04:18 -06:00
rewrite find module
This commit is contained in:
parent
dff345b9f0
commit
b38b20a81b
2 changed files with 21 additions and 27 deletions
1
.github/actions/nix/action.yml
vendored
1
.github/actions/nix/action.yml
vendored
|
@ -27,7 +27,6 @@ runs:
|
||||||
BTRFS: ${{ inputs.btrfs }}
|
BTRFS: ${{ inputs.btrfs }}
|
||||||
run: exec ${{ github.action_path }}/prepare.sh
|
run: exec ${{ github.action_path }}/prepare.sh
|
||||||
|
|
||||||
|
|
||||||
- uses: daylinmorgan/lix-gha-installer-action@released
|
- uses: daylinmorgan/lix-gha-installer-action@released
|
||||||
with:
|
with:
|
||||||
extra-conf: ${{ inputs.nix_conf }}
|
extra-conf: ${{ inputs.nix_conf }}
|
||||||
|
|
|
@ -10,13 +10,9 @@ let
|
||||||
;
|
;
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
# https://github.com/balsoft/nixos-config/blob/73cc2c3a8bb62a9c3980a16ae70b2e97af6e1abd/flake.nix#L109-L120
|
|
||||||
findModulesList =
|
handleModule =
|
||||||
dir:
|
dir: name: type:
|
||||||
concatLists (
|
|
||||||
attrValues (
|
|
||||||
mapAttrs (
|
|
||||||
name: type:
|
|
||||||
if type == "regular" then
|
if type == "regular" then
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
@ -32,8 +28,7 @@ rec {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
else
|
else
|
||||||
findModulesList (dir + "/${name}")
|
findModulesList (dir + "/${name}");
|
||||||
) (readDir dir)
|
|
||||||
)
|
findModulesList = dir: (readDir dir) |> mapAttrs (handleModule dir) |> attrValues |> concatLists;
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue