dynamic module imports

This commit is contained in:
Zynh Ludwig 2024-07-09 02:57:38 -07:00
parent 448d806201
commit cddc4d6b1e

View file

@ -1,22 +1,14 @@
{ lib, ... }:
with builtins; with lib; let
dirEntries = removeAttrs (readDir ./.) [ "default.nix" ];
moduleEntries = attrsets.filterAttrs (n: v: v == "regular") dirEntries;
moduleNames = attrNames moduleEntries;
modulePaths = map (name: ./${name}) moduleNames;
in
{
imports = [
./neovim.nix
./filetypes.nix
./alacritty.nix
./fish.nix
./git.nix
./tmux.nix
./user.nix
./theme.nix
./projects.nix
./easyeffects.nix
./lazygit.nix
./dunst.nix
./sops.nix
./ssh.nix
];
imports = modulePaths;
nixpkgs.config.allowUnfree = true;