all repos — nixfiles @ b5bcdf72cbc998550bf55af1842fe65f8c9ef0bf

System and user configuration, managed by nix and home-manager

Revert "Switch back to flakes" This reverts commit c0384c43821474d28af1d9696ceb473a0d769292.

Alan Pearce
commit

b5bcdf72cbc998550bf55af1842fe65f8c9ef0bf

parent

734a3cebed8dd4be66a546179dbda890abc5a10d

1 file changed, 25 insertions(+), 0 deletions(-)

changed files
A lib/default.nix
@@ -0,0 +1,25 @@
+{ pkgs }: +with builtins; +let + inherit (pkgs) lib; +in +rec { + importPathStore = p: "${append ../. "/${p}"}"; + + mkPathable = s: toString ( + if lib.path.subpath.isValid s + then (lib.path.append ../. s) + else s + ); + + kvPath = k: v: "${k}=${v}"; + + fromSources = sources: + lib.attrsets.mapAttrs + (k: v: v.outPath) + sources; + + mkNixPath = sources: lib.attrsets.mapAttrsToList + (k: v: kvPath k (mkPathable v)) + sources; +}