From f236f3add63eca52792685166b10fc98c7377916 Mon Sep 17 00:00:00 2001 From: caem Date: Thu, 23 Jan 2025 15:46:27 +0100 Subject: [PATCH] 2fz4cxrw --- flake.nix | 1 + lib/hosts.nix | 2 ++ modules/nixos/core/nix.nix | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 12af0b5..024aa1b 100644 --- a/flake.nix +++ b/flake.nix @@ -46,6 +46,7 @@ nixpkgs = nixpkgs; inputs = inputs; user = "caem"; + flakeRoot = ./.; modules = [ impermanence.nixosModules.impermanence disko.nixosModules.disko diff --git a/lib/hosts.nix b/lib/hosts.nix index dbcae5b..4a41eb3 100644 --- a/lib/hosts.nix +++ b/lib/hosts.nix @@ -6,6 +6,7 @@ inputs, modules, user, + flakeRoot, }: builtins.listToAttrs (builtins.map (host: { name = host; value = nixpkgs.lib.nixosSystem { @@ -18,6 +19,7 @@ inherit inputs; inherit lib; username = user; + rootDir = flakeRoot; }; }; }) (lib.getDirsInDir ../hosts)); diff --git a/modules/nixos/core/nix.nix b/modules/nixos/core/nix.nix index 548d448..06e0340 100644 --- a/modules/nixos/core/nix.nix +++ b/modules/nixos/core/nix.nix @@ -1,4 +1,4 @@ -{ lib, inputs, ... }: +{ lib, inputs, rootDir, ... }: let /* @@ -14,7 +14,7 @@ let (file: builtins.match ".*\.nix" (builtins.toString file) != null) (lib.filesystem.listFilesRecursive ../../../overlays)); */ - c = builtins.trace ../../../overlays null; + c = builtins.trace "${rootDir}/overlays" null; a = builtins.trace (lib.filesystem.listFilesRecursive ./.) null; in { nix = {