From 33657999e2faed7f0d0dc72a6afc2096663f95e4 Mon Sep 17 00:00:00 2001 From: SebastianStork Date: Sun, 13 Apr 2025 14:36:05 +0200 Subject: [PATCH] Set registry and nixPath --- hosts/shared.nix | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/hosts/shared.nix b/hosts/shared.nix index 00707ad..25d1339 100644 --- a/hosts/shared.nix +++ b/hosts/shared.nix @@ -2,6 +2,7 @@ config, inputs, self, + lib, pkgs, ... }: @@ -10,22 +11,32 @@ networking.domain = "stork-atlas.ts.net"; - nix = { - channel.enable = false; - settings = { - experimental-features = [ - "nix-command" - "flakes" - "pipe-operators" - ]; - auto-optimise-store = true; - warn-dirty = false; - trusted-users = [ - "root" - "@wheel" - ]; + nix = + let + flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs; + in + { + channel.enable = false; + registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs; + nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs; + + settings = { + flake-registry = ""; + nix-path = config.nix.nixPath; + + experimental-features = [ + "nix-command" + "flakes" + "pipe-operators" + ]; + auto-optimise-store = true; + warn-dirty = false; + trusted-users = [ + "root" + "@wheel" + ]; + }; }; - }; time.timeZone = "Europe/Berlin"; i18n = {