From 64950f00f3873dae1fea46dd039f186ed7e23084 Mon Sep 17 00:00:00 2001 From: reo101 Date: Thu, 7 Sep 2023 01:17:53 +0300 Subject: [PATCH] fix(flake): don't build `__template__` machines --- util/default.nix | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/util/default.nix b/util/default.nix index 47826ba..df8acb1 100644 --- a/util/default.nix +++ b/util/default.nix @@ -228,15 +228,17 @@ rec { (builtins.attrValues (builtins.mapAttrs (system: hosts: - lib.filterAttrs + lib.concatMapAttrs (host: config: - config != null) - (builtins.mapAttrs - (host: config: - if (pred system host config) - then mkHost system host config - else null) - hosts)) + lib.optionalAttrs + (and [ + (host != "__template__") + (pred system host config) + ]) + { + ${host} = mkHost system host config; + }) + hosts) machines)); # Configurations