Personal Nix flake
nixos home-manager nix
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor(lib): Kill most loaders

Those are unnecessarily complex remnants that weren't being used anyway

-62
-62
nix/lib/loaders.nix
··· 30 30 |> (attr: removeAttrs attr ["default" "default.nix"]) 31 31 |> lib.filterAttrsRecursive (_: path: filterFn path); 32 32 33 - # Lists files as paths 34 - list = { 35 - path, 36 - filterFn ? (x: true), 37 - recursive ? false, 38 - }: 39 - read {inherit path recursive;} 40 - |> lib.collect builtins.isPath 41 - |> builtins.filter (path: 42 - path 43 - |> toString 44 - |> filterFn) 45 - |> map ( 46 - path: 47 - path 48 - |> toString 49 - |> lib.removeSuffix "/default.nix" 50 - |> (x: /. + x) 51 - ); 52 - 53 - # Lists files ending in default.nix 54 - listDefault = path: 55 - list { 56 - inherit path; 57 - filterFn = lib.hasSuffix "default.nix"; 58 - }; 59 - 60 - # Lists files ending in default.nix recursively 61 - listDefaultRecursive = path: 62 - list { 63 - inherit path; 64 - filterFn = lib.hasSuffix "default.nix"; 65 - recursive = true; 66 - }; 67 - 68 - # Lists files not ending in default.nix 69 - listNonDefault = path: 70 - list { 71 - inherit path; 72 - filterFn = path: ! (lib.hasSuffix "default.nix" path); 73 - }; 74 - 75 - # Lists files not ending in default.nix 76 - listNonDefaultRecursive = path: 77 - list { 78 - inherit path; 79 - filterFn = path: ! (lib.hasSuffix "default.nix" path); 80 - recursive = true; 81 - }; 82 - 83 - # Imports modules ending in default.nix 84 - importDefault = path: args: 85 - path 86 - |> listDefault 87 - |> map (path: import path args); 88 - 89 - # Imports modules not ending in default.nix 90 - importNonDefault = path: args: 91 - path 92 - |> listNonDefault 93 - |> map (path: import path args); 94 - 95 33 # Loads modules while preserving directory structure 96 34 load = { 97 35 path,