about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--machines/profpatsch/haku.nix15
1 files changed, 13 insertions, 2 deletions
diff --git a/machines/profpatsch/haku.nix b/machines/profpatsch/haku.nix
index 44035311..39c617a7 100644
--- a/machines/profpatsch/haku.nix
+++ b/machines/profpatsch/haku.nix
@@ -38,8 +38,19 @@ in
     nix.maxJobs = 2;
     vuizvui.modifyNixPath = false;
     nix.nixPath = [
-      "vuizvui=/root/vuizvui"
-      "nixpkgs=/root/nixpkgs"
+      "nixpkgs=${with pkgs.vuizvui.profpatsch; filterSourceGitignoreWith {
+          gitignoreLines =
+            readGitignoreFile "${toString pkgs.path}/.gitignore";
+          globMap = glob:
+            # filter out the non-rooted file globs,
+            # because those take forever to filter
+            # (10(!) seconds evaluation time in my test).
+            if (!glob.isDir && !glob.isRooted)
+            then null
+            else glob;
+        } pkgs.path}"
+      # TODO?
+      # "vuizvui=/root/vuizvui"
       # TODO: nicer?
       "nixos-config=${pkgs.writeText "haku-configuration.nix" ''
         (import <vuizvui/machines>).profpatsch.haku.config