From e643e105a28d3223589f86285ecd11a6e3095d4b Mon Sep 17 00:00:00 2001 From: Nick Date: Sat, 23 Nov 2024 20:21:32 -0600 Subject: [PATCH] feat: server test --- nixos/default.nix | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/nixos/default.nix b/nixos/default.nix index d1ed09d..b0d14c8 100755 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -1,7 +1,5 @@ let modulesPath = ./modules; - servicePath = modulesPath + /services; - moduleImport = path: nameTransform: builtins.listToAttrs ( map @@ -15,10 +13,22 @@ let (builtins.attrNames (builtins.readDir path)) ) ); - modules = moduleImport modulesPath (name: builtins.replaceStrings [".nix"] [""] name) - // moduleImport servicePath (name: builtins.replaceStrings [".nix"] [""] name); + // (path: + builtins.listToAttrs ( + map + (name: { + name = name; + value = import (path + "/${name}"); + }) + ( + builtins.filter + (name: (builtins.readDir path).${name} == "directory") + (builtins.attrNames (builtins.readDir path)) + ) + )) + modulesPath; in { flake.nixosModules = { personal = {