From ea1a0b72b5736e0309b71ae1009e2dd689e7dd92 Mon Sep 17 00:00:00 2001 From: Colin Date: Wed, 12 Jun 2024 23:20:37 +0000 Subject: [PATCH] hosts/common/nix: migrate the nixpkgs-overlay integration point (part 1) this has to be done in two steps to avoid nix-daemon bugs --- hosts/common/nix/default.nix | 8 ++++++-- integrations/nixpkgs/nixpkgs-overlays.nix | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 integrations/nixpkgs/nixpkgs-overlays.nix diff --git a/hosts/common/nix/default.nix b/hosts/common/nix/default.nix index 7f391386..62e88459 100644 --- a/hosts/common/nix/default.nix +++ b/hosts/common/nix/default.nix @@ -59,8 +59,12 @@ # note the import starts at repo root: this allows `./overlay/default.nix` to access the stuff at the root # "nixpkgs-overlays=${../../..}/hosts/common/nix-path/overlay" # as long as my system itself doesn't rely on NIXPKGS at runtime, we can point the overlays to git - # to avoid switching so much during development - "nixpkgs-overlays=/home/colin/dev/nixos/hosts/common/nix/overlay" + # to avoid `switch`ing so much during development. + # TODO: it would be nice to remove this someday! + # it's an impurity that touches way more than i need and tends to cause hard-to-debug eval issues + # when it goes wrong. should i port my `nix-shell` scripts to something more tailored to my uses + # and then delete `nixpkgs-overlays`? + "nixpkgs-overlays=/home/colin/dev/nixos/integrations/nixpkgs/nixpkgs-overlays.nix" ]; # ensure new deployments have a source of this repo with which they can bootstrap. diff --git a/integrations/nixpkgs/nixpkgs-overlays.nix b/integrations/nixpkgs/nixpkgs-overlays.nix new file mode 100644 index 00000000..d586abf2 --- /dev/null +++ b/integrations/nixpkgs/nixpkgs-overlays.nix @@ -0,0 +1,5 @@ +# this file exists so i can use my custom packages inside `nix-shell`. +# it works by using stock upstream `nixpkgs` +# and putting NIX_PATH=nixpkgs-overlays=/path/to/here on the nixbld environment. +# +[(import ../../overlays/all.nix)]