pinwheel: Dynamically read modules to import

This commit is contained in:
Alexander Heldt
2023-10-05 22:34:15 +02:00
parent fb9fa7ca9c
commit 326e1abca1

View File

@@ -1,37 +1,8 @@
{ lib, ... }:
let
toModulePath = dir: _: ./. + "/${dir}";
filterDirs = dirs: lib.attrsets.filterAttrs (_: type: type == "directory") dirs;
in
{
imports = [
./light
./sound
./keyboard
./age
./ssh
./git
./zsh
./tmux
./vim
./emacs
./foot
./hyprland
./waybar
./swaylock
./dunst
./bemenu
./screenshot
./fzf
./syncthing
./firefox
./mullvad
./openvpn
./calibre
./go
./nix
./javascript
./spotify
./docker
./podman
./k8s
./scripts
./work
];
imports = lib.mapAttrsToList toModulePath (filterDirs (builtins.readDir ./.));
}