mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
2daf5f1b05
Thanks @KaitlynEthylia :)
15 lines
415 B
Nix
15 lines
415 B
Nix
{ pkgs, ... }:
|
|
|
|
exclude: cwd: with builtins; with pkgs.lib; filter
|
|
(e: !elem e exclude)
|
|
(map
|
|
(p: path.append cwd p)
|
|
(attrNames (attrsets.filterAttrs
|
|
(p: t:
|
|
let
|
|
d = t == "directory";
|
|
b = baseNameOf p;
|
|
in
|
|
d && pathExists (path.append cwd (p + "/default.nix")) ||
|
|
!d && match ''.*\.nix'' b != null && b != "default.nix")
|
|
(readDir cwd))))
|