dynamic module imports
This commit is contained in:
parent
448d806201
commit
cddc4d6b1e
1 changed files with 8 additions and 16 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue