dynamic module imports

sh-initrd-on-root
Zynh Ludwig 2024-07-09 02:57:38 -07:00
parent 448d806201
commit cddc4d6b1e
1 changed files with 8 additions and 16 deletions

View File

@ -1,22 +1,14 @@
{ lib, ... }: { 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 = [ imports = modulePaths;
./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
];
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;