mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-22 00:21:34 +01:00
Recursively import host .nix files
This commit is contained in:
parent
e714be2fec
commit
c2ff5c18a2
1 changed files with 2 additions and 4 deletions
|
|
@ -12,10 +12,8 @@ let
|
|||
let
|
||||
hostFiles =
|
||||
"${self}/hosts/${hostName}"
|
||||
|> builtins.readDir
|
||||
|> lib.filterAttrs (fileName: type: (fileName |> lib.hasSuffix ".nix") && type == "regular")
|
||||
|> builtins.attrNames
|
||||
|> map (fileName: "${self}/hosts/${hostName}/${fileName}");
|
||||
|> lib.filesystem.listFilesRecursive
|
||||
|> builtins.filter (lib.hasSuffix ".nix");
|
||||
userFiles =
|
||||
"${self}/users"
|
||||
|> builtins.readDir
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue