nix: move maybePathOrDefault to combinators

This commit is contained in:
Primrose 2024-10-16 20:14:50 +02:00
parent b68c203ab0
commit a0ffe467d1
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
2 changed files with 21 additions and 12 deletions

View file

@ -1,11 +1,13 @@
{
self,
lib,
inputs,
many,
mkDarwin,
mkHomeManager,
mkNixOS,
maybePathOrDefault,
...
}:
@ -38,16 +40,6 @@ let
};
};
maybePathOrDefault =
path: default:
if
lib.pathExists # Test directory/default.nix or just the file
(if lib.pathIsDirectory path then (lib.path.append path "default.nix") else path)
then
path
else
default;
mkNixOSes =
let
sharedModules =