From 6ae2b9ab647e2745c415b327f18936412e94da40 Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Sun, 22 Oct 2023 17:33:57 +0200 Subject: [PATCH] sombrero: Add `modules` --- hosts/sombrero/configuration.nix | 1 + hosts/sombrero/modules/default.nix | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 hosts/sombrero/modules/default.nix diff --git a/hosts/sombrero/configuration.nix b/hosts/sombrero/configuration.nix index cb4597c..f17acee 100644 --- a/hosts/sombrero/configuration.nix +++ b/hosts/sombrero/configuration.nix @@ -15,6 +15,7 @@ [ ../../config-manager/default.nix ./hardware-configuration.nix + ./modules ]; boot = { diff --git a/hosts/sombrero/modules/default.nix b/hosts/sombrero/modules/default.nix new file mode 100644 index 0000000..4f74ef5 --- /dev/null +++ b/hosts/sombrero/modules/default.nix @@ -0,0 +1,8 @@ +{ lib, ... }: +let + toModulePath = dir: _: ./. + "/${dir}"; + filterDirs = dirs: lib.attrsets.filterAttrs (_: type: type == "directory") dirs; +in +{ + imports = lib.mapAttrsToList toModulePath (filterDirs (builtins.readDir ./.)); +}