From 3a325437b8ff2ad1ba76db1d69752ad55088ab37 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Sun, 8 Dec 2024 12:04:54 +0100 Subject: [PATCH] chore(hive.nix): Simplify system management --- hive.nix | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/hive.nix b/hive.nix index 6c1a087..f5a17f3 100644 --- a/hive.nix +++ b/hive.nix @@ -6,7 +6,7 @@ let .applyPatches' sources'; nix-lib = import ./lib/nix-lib; - inherit (nix-lib) warn; + inherit (nix-lib) mapSingleFuse; patch = import ./lib/nix-patches { patchFile = ./patches; }; @@ -22,17 +22,12 @@ let nixpkgs' = import ./meta/nixpkgs.nix; # All supported nixpkgs versions × systems, instanciated - nixpkgs = nix-lib.mapSingleFuse ( - s: nix-lib.mapSingleFuse (mkSystemNixpkgs s) nixpkgs'.versions - ) nixpkgs'.systems; + nixpkgs = mapSingleFuse (s: mapSingleFuse (mkSystemNixpkgs s) nixpkgs'.versions) nixpkgs'.systems; # Get the configured nixos version for the node, # defaulting to the one defined in meta/nixpkgs version = node: nodes'.${node}.nixpkgs.version; - system = - node: - nodes'.${node}.nixpkgs.system - or (warn "${node}: Not specifying the `deployment.systemType` is deprecated!" "nixos"); + system = node: nodes'.${node}.nixpkgs.system; nodePkgs = node: nixpkgs.${system node}.${version node}; @@ -88,7 +83,7 @@ in { meta = { - nodeNixpkgs = nix-lib.mapSingleFuse nodePkgs nodes; + nodeNixpkgs = mapSingleFuse nodePkgs nodes; specialArgs = { inherit nixpkgs sources; @@ -96,7 +91,7 @@ in dgn-keys = import ./keys; }; - nodeSpecialArgs = nix-lib.mapSingleFuse mkArgs nodes; + nodeSpecialArgs = mapSingleFuse mkArgs nodes; }; registry = { @@ -140,4 +135,4 @@ in }; }; } -// (nix-lib.mapSingleFuse mkNode nodes) +// (mapSingleFuse mkNode nodes)