From ba2c3c21ca1da5d2a9ae1d92117c0edab5fcfdb9 Mon Sep 17 00:00:00 2001 From: Chris Dombroski Date: Sun, 26 May 2024 13:01:34 -0400 Subject: [PATCH] Improve common import --- modules/common.nix | 4 ++-- systems/smolboi/home.nix | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/common.nix b/modules/common.nix index 9c49a37..92eef3d 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -1,3 +1,3 @@ -{...}: { - imports = builtins.map (n: toString ./common + "/${n}") (builtins.attrNames (builtins.removeAttrs (builtins.readDir ./common) [(builtins.unsafeGetAttrPos "_" {_ = null;}).file])); +{ lib, ...}: { + imports = builtins.map (n: ./common + "/${n}") (builtins.attrNames (lib.filterAttrs (k: v: v == "regular" && lib.hasSuffix ".nix" k) (builtins.readDir ./common))); } diff --git a/systems/smolboi/home.nix b/systems/smolboi/home.nix index 08eb19a..4255c9a 100644 --- a/systems/smolboi/home.nix +++ b/systems/smolboi/home.nix @@ -56,7 +56,6 @@ ]; }) - # # Adds the 'hello' command to your environment. It prints a friendly # # "Hello, world!" when run. # pkgs.hello