From eea7280f9806eb267148ec8bd4f2fa571136d6be Mon Sep 17 00:00:00 2001 From: reo101 Date: Mon, 10 Jun 2024 00:18:41 +0300 Subject: [PATCH] fix(jeeves)!: `nix.registry` and `nix.nixPath` --- .../x86_64-linux/jeeves/configuration.nix | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/machines/nixos/x86_64-linux/jeeves/configuration.nix b/machines/nixos/x86_64-linux/jeeves/configuration.nix index 6e06a4f..a665ec4 100644 --- a/machines/nixos/x86_64-linux/jeeves/configuration.nix +++ b/machines/nixos/x86_64-linux/jeeves/configuration.nix @@ -50,19 +50,16 @@ hardware.enableRedistributableFirmware = true; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - nix = { - registry = - lib.mapAttrs - (_: value: { - flake = value; - }) - inputs; + nix = let + flakeInputs = lib.filterAttrs (lib.const (lib.isType "flake")) inputs; + in { + # This will add each flake input as a registry + # To make nix3 commands consistent with your flake + registry = lib.mapAttrs (_: value: { flake = value; }) flakeInputs; - nixPath = - lib.mapAttrsToList - (key: value: - "${key}=${value.to.path}") - config.nix.registry; + # This will additionally add your inputs to the system's legacy channels + # Making legacy nix commands consistent as well, awesome! + nixPath = lib.mapAttrsToList (key: value: "${key}=flake:${key}") flakeInputs; settings = { trusted-users = [