support for patching nixpkgs instance used by home manager
- introduce support for patching the used nixpkgs instance via `applyPatches`, see https://ertt.ca/nix/patch-nixpkgs/ - use patched nixpkgs instance in mkHomeManagern (TODO: use it in more places) - add patch for nodejs-20 test failure in darwin (currently just in staging)
This commit is contained in:
parent
4222e4ac66
commit
e64fadd32b
2 changed files with 37 additions and 1 deletions
12
flake.nix
12
flake.nix
|
@ -46,6 +46,16 @@
|
|||
let
|
||||
# FIXME: allow different systems
|
||||
systems = utils.lib.system;
|
||||
|
||||
# ability to extend nixpkgs with patches, e.g. from PRs or staging. See https://ertt.ca/nix/patch-nixpkgs/
|
||||
mkNixpkgs-patched =
|
||||
system:
|
||||
(import nixpkgs { inherit system; }).applyPatches {
|
||||
name = "nixpkgs-patched";
|
||||
src = nixpkgs;
|
||||
patches = [ ./patches/nixos-nixpkgs-362c2bc76d359b908ad1389ee28c23ee0e862324.patch ];
|
||||
};
|
||||
|
||||
# necessary to make the top-level inputs available to system configuration
|
||||
# inspired by https://jade.fyi/blog/flakes-arent-real/
|
||||
inputInjection =
|
||||
|
@ -78,7 +88,7 @@
|
|||
mkHomeManager =
|
||||
confName: user: system: # unfortunately, home-manager configs are still system-specific
|
||||
home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
pkgs = import (mkNixpkgs-patched system) { inherit system; };
|
||||
modules = [
|
||||
{
|
||||
imports = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue