move modules into nixosModules, add autoimport
This commit is contained in:
17
lib/default.nix
Normal file
17
lib/default.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ lib, ... }:
|
||||
let
|
||||
clanLib = {
|
||||
findNixFiles = folder:
|
||||
lib.mapAttrs'
|
||||
(name: type:
|
||||
if
|
||||
type == "directory"
|
||||
then
|
||||
lib.nameValuePair name "${folder}/${name}"
|
||||
else
|
||||
lib.nameValuePair (lib.removeSuffix ".nix" name) "${folder}/${name}"
|
||||
)
|
||||
(builtins.readDir folder);
|
||||
};
|
||||
in
|
||||
clanLib
|
||||
Reference in New Issue
Block a user