summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2025-05-21 09:24:30 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2025-05-21 09:24:30 +0200
commit75695d3e42bfe15483cefa43f316a4ae11a3bcca (patch)
treeb4c17493825d4d6894fed3ea89c2255a17d9e529 /flake.nix
parent861a04827a19facd4ce0eb4693de43f64507df52 (diff)
downloadnixos-75695d3e42bfe15483cefa43f316a4ae11a3bcca.tar
nixos-75695d3e42bfe15483cefa43f316a4ae11a3bcca.tar.gz
nixos-75695d3e42bfe15483cefa43f316a4ae11a3bcca.tar.bz2
nixos-75695d3e42bfe15483cefa43f316a4ae11a3bcca.tar.xz
nixos-75695d3e42bfe15483cefa43f316a4ae11a3bcca.zip
...
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/flake.nix b/flake.nix
index 039dee1f..20ab9f7e 100644
--- a/flake.nix
+++ b/flake.nix
@@ -363,7 +363,7 @@
363 363
364 overlays = mapAttrs (_name: path: mkOverlay path) overlayPaths; 364 overlays = mapAttrs (_name: path: mkOverlay path) overlayPaths;
365 365
366 packages = forAllSystems (system: systemPkgs: nixImport rec { dir = ./tools; _import = _path: name: import "${toString dir}/${name}" ({ inherit system; } // inputs); }); 366 packages = forAllSystems (system: systemPkgs: nixImport rec { dir = ./tools; _import = name: _base: import (dir + "/${name}") ({ inherit system; } // inputs); });
367 367
368 # packages = mapAttrs (_name: filterAttrs (_name: isDerivation)) packages; 368 # packages = mapAttrs (_name: filterAttrs (_name: isDerivation)) packages;
369 # packages' = mapAttrs (_name: filterAttrs (_name: value: !(isDerivation value))) packages; 369 # packages' = mapAttrs (_name: filterAttrs (_name: value: !(isDerivation value))) packages;
@@ -375,6 +375,8 @@
375 activateNixosConfigurations activateHomeManagerConfigurations 375 activateNixosConfigurations activateHomeManagerConfigurations
376 ]; 376 ];
377 377
378 lib = nixImport rec { dir = ./lib; _import = name: _base: import (dir + "/${name}") inputs; };
379
378 devShells = forAllSystems (system: systemPkgs: { default = import ./shell.nix ({ inherit system; } // inputs); } // installerShells system systemPkgs); 380 devShells = forAllSystems (system: systemPkgs: { default = import ./shell.nix ({ inherit system; } // inputs); } // installerShells system systemPkgs);
379 381
380 templates.default = { 382 templates.default = {
@@ -398,7 +400,7 @@
398 # path = activateHomeManager (self.nixosConfigurations.${hostname}.config.nixpkgs.system) usercfg.home; 400 # path = activateHomeManager (self.nixosConfigurations.${hostname}.config.nixpkgs.system) usercfg.home;
399 # }) self.nixosConfigurations.${hostname}.config.home-manager.users); 401 # }) self.nixosConfigurations.${hostname}.config.home-manager.users);
400 }) (nixImport { dir = ./hosts; _import = (_path: name: name); }); 402 }) (nixImport { dir = ./hosts; _import = (_path: name: name); });
401 overrides = if pathExists ./deploy then nixImport { dir = ./deploy; _import = path: _name: import (./deploy + "/${path}") inputs; } else {}; 403 overrides = if pathExists ./deploy then nixImport rec { dir = ./deploy; _import = path: _name: import (dir + "/${path}") inputs; } else {};
402 filterEnabled = attrs: mapAttrs (_n: v: filterAttrs (n: _v: n != "enabled") v) (filterAttrs (_n: v: v.enabled or true) attrs); 404 filterEnabled = attrs: mapAttrs (_n: v: filterAttrs (n: _v: n != "enabled") v) (filterAttrs (_n: v: v.enabled or true) attrs);
403 in mapAttrs (_n: v: if v ? "profiles" then v // { profiles = filterEnabled v.profiles; } else v) (filterEnabled (recursiveUpdate defaults overrides)); 405 in mapAttrs (_n: v: if v ? "profiles" then v // { profiles = filterEnabled v.profiles; } else v) (filterEnabled (recursiveUpdate defaults overrides));
404 406