From 75695d3e42bfe15483cefa43f316a4ae11a3bcca Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 21 May 2025 09:24:30 +0200 Subject: ... --- flake.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 039dee1f..20ab9f7e 100644 --- a/flake.nix +++ b/flake.nix @@ -363,7 +363,7 @@ overlays = mapAttrs (_name: path: mkOverlay path) overlayPaths; - packages = forAllSystems (system: systemPkgs: nixImport rec { dir = ./tools; _import = _path: name: import "${toString dir}/${name}" ({ inherit system; } // inputs); }); + packages = forAllSystems (system: systemPkgs: nixImport rec { dir = ./tools; _import = name: _base: import (dir + "/${name}") ({ inherit system; } // inputs); }); # packages = mapAttrs (_name: filterAttrs (_name: isDerivation)) packages; # packages' = mapAttrs (_name: filterAttrs (_name: value: !(isDerivation value))) packages; @@ -375,6 +375,8 @@ activateNixosConfigurations activateHomeManagerConfigurations ]; + lib = nixImport rec { dir = ./lib; _import = name: _base: import (dir + "/${name}") inputs; }; + devShells = forAllSystems (system: systemPkgs: { default = import ./shell.nix ({ inherit system; } // inputs); } // installerShells system systemPkgs); templates.default = { @@ -398,7 +400,7 @@ # path = activateHomeManager (self.nixosConfigurations.${hostname}.config.nixpkgs.system) usercfg.home; # }) self.nixosConfigurations.${hostname}.config.home-manager.users); }) (nixImport { dir = ./hosts; _import = (_path: name: name); }); - overrides = if pathExists ./deploy then nixImport { dir = ./deploy; _import = path: _name: import (./deploy + "/${path}") inputs; } else {}; + overrides = if pathExists ./deploy then nixImport rec { dir = ./deploy; _import = path: _name: import (dir + "/${path}") inputs; } else {}; filterEnabled = attrs: mapAttrs (_n: v: filterAttrs (n: _v: n != "enabled") v) (filterAttrs (_n: v: v.enabled or true) attrs); in mapAttrs (_n: v: if v ? "profiles" then v // { profiles = filterEnabled v.profiles; } else v) (filterEnabled (recursiveUpdate defaults overrides)); -- cgit v1.2.3