From aa35b92429bd70a208aeb681521bc848ee28335b Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Tue, 23 Jan 2024 12:50:40 -0600 Subject: [PATCH] abstractions ? --- lib/default.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/default.nix b/lib/default.nix index 14fe311..8c33717 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -7,12 +7,13 @@ inherit (nixpkgs.lib) hasSuffix nixosSystem; inherit (nixpkgs.lib.filesystem) listFilesRecursive; in rec { + isNixFile = path: hasSuffix ".nix" path; + mkSystem = hostname: nixosSystem { system = "x86_64-linux"; modules = - builtins.filter - (path: hasSuffix ".nix" path) (listFilesRecursive (../. + "/hosts/${hostname}")); + builtins.filter isNixFile (listFilesRecursive (../. + "/hosts/${hostname}")); specialArgs = {inherit inputs;}; };