nixos: use bulk module import

This commit is contained in:
Zynh Ludwig 2024-07-26 15:37:27 -07:00
parent f2af0dfd64
commit e46de005fd

View file

@ -1,14 +1,14 @@
{ lib, ... }: { lib, ... }:
let
dirEntries = builtins.removeAttrs (builtins.readDir ./.) [ "default.nix" ];
moduleEntries = lib.attrsets.filterAttrs (n: v: v == "regular") dirEntries;
moduleNames = builtins.attrNames moduleEntries;
modulePaths = builtins.map (name: ./${name}) moduleNames;
in
{ {
imports = [ imports = modulePaths;
./dwm.nix
./i18n.nix
./audio.nix
./env.nix
./syncthing.nix
./plymouth.nix
];
snowhawk.i18n.enable = lib.mkDefault true; snowhawk.i18n.enable = lib.mkDefault true;
snowhawk.audio.enable = lib.mkDefault true; snowhawk.audio.enable = lib.mkDefault true;