From 2613d72ccfe24452c29a1293a1cd411e1318660a Mon Sep 17 00:00:00 2001 From: Daniel Baker Date: Thu, 28 Nov 2024 15:56:52 -0800 Subject: [PATCH] nix.checks: create clean switch-configuration source Adds `switchConfigurationSrc` source to checks that can be used for other checks. This will replace derivations that use `self` for the source which creates a new derivation every time anything in the repository changes. --- nix/checks/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nix/checks/default.nix b/nix/checks/default.nix index 7f918a5b..4a8ee0cf 100644 --- a/nix/checks/default.nix +++ b/nix/checks/default.nix @@ -28,6 +28,15 @@ let ../../switch-configuration ]; }; + + # Used for derivations where switch-configuration is the primary directory. + switchConfigurationSrc = toSource { + root = ../..; + fileset = unions [ + ../../facts + ../../switch-configuration + ]; + }; in genAttrs [