-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve getImports function and add to hs
- Loading branch information
1 parent
73f8937
commit 16fda03
Showing
3 changed files
with
8 additions
and
17 deletions.
There are no files selected for viewing
21 changes: 6 additions & 15 deletions
21
configuration/devices/headless/server/home-assistant/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ lib, ... }: | ||
let | ||
getFiles = dir: lib.attrNames (builtins.readDir dir); | ||
getImports = dir: map (file: dir + "/${file}") (lib.filter (file: file != "default.nix") (getFiles dir)); | ||
getImports = dir: map (file: dir + "/${file}") (lib.filter (file: !(lib.hasSuffix ".md" file) && file != "default.nix") (getFiles dir)); | ||
in { imports = getImports ./.; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters