diff --git a/flake.lock b/flake.lock index 897ee17..8ee8ebd 100644 --- a/flake.lock +++ b/flake.lock @@ -102,11 +102,11 @@ ] }, "locked": { - "lastModified": 1746171682, - "narHash": "sha256-EyXUNSa+H+YvGVuQJP1nZskXAowxKYp79RNUsNdQTj4=", + "lastModified": 1747020534, + "narHash": "sha256-D/6rkiC6w2p+4SwRiVKrWIeYzun8FBg7NlMKMwQMxO0=", "owner": "nix-community", "repo": "home-manager", - "rev": "50eee705bbdbac942074a8c120e8194185633675", + "rev": "b4bbdc6fde16fc2051fcde232f6e288cd22007ca", "type": "github" }, "original": { @@ -179,11 +179,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1746621361, - "narHash": "sha256-T9vOxEqI1j1RYugV0b9dgy0AreiZ9yBDKZJYyclF0og=", + "lastModified": 1747129300, + "narHash": "sha256-L3clA5YGeYCF47ghsI7Tcex+DnaaN/BbQ4dR2wzoiKg=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "2ea3ad8a1f26a76f8a8e23fc4f7757c46ef30ee5", + "rev": "e81fd167b33121269149c57806599045fd33eeed", "type": "github" }, "original": { @@ -195,11 +195,11 @@ }, "nixos-unstable": { "locked": { - "lastModified": 1746461020, - "narHash": "sha256-7+pG1I9jvxNlmln4YgnlW4o+w0TZX24k688mibiFDUE=", + "lastModified": 1746904237, + "narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3730d8a308f94996a9ba7c7138ede69c1b9ac4ae", + "rev": "d89fc19e405cb2d55ce7cc114356846a0ee5e956", "type": "github" }, "original": { @@ -243,11 +243,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1746557022, - "narHash": "sha256-QkNoyEf6TbaTW5UZYX0OkwIJ/ZMeKSSoOMnSDPQuol0=", + "lastModified": 1746957726, + "narHash": "sha256-k9ut1LSfHCr0AW82ttEQzXVCqmyWVA5+SHJkS5ID/Jo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1d3aeb5a193b9ff13f63f4d9cc169fb88129f860", + "rev": "a39ed32a651fdee6842ec930761e31d1f242cb94", "type": "github" }, "original": { @@ -259,11 +259,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1746461020, - "narHash": "sha256-7+pG1I9jvxNlmln4YgnlW4o+w0TZX24k688mibiFDUE=", + "lastModified": 1746904237, + "narHash": "sha256-3e+AVBczosP5dCLQmMoMEogM57gmZ2qrVSrmq9aResQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3730d8a308f94996a9ba7c7138ede69c1b9ac4ae", + "rev": "d89fc19e405cb2d55ce7cc114356846a0ee5e956", "type": "github" }, "original": { @@ -280,11 +280,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1746740791, - "narHash": "sha256-4o0Aj9BXpybfAkcxY3h9+y0AuC5TtIVztuTdVXYubrI=", + "lastModified": 1747261242, + "narHash": "sha256-6p8kO62jbk+LUrDrLT23XbClNRyosnlfh/KCbE5fwnQ=", "owner": "nix-community", "repo": "NUR", - "rev": "228d29ab7ffa3f89d0088917883b179c7bce05f2", + "rev": "e29c558fa4174da179e2e7f9a41c34466a200fda", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 0f89e9b..470ae9b 100644 --- a/flake.nix +++ b/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 = [ diff --git a/home/common.nix b/home/common.nix index 693593f..9cb8df9 100644 --- a/home/common.nix +++ b/home/common.nix @@ -73,6 +73,7 @@ '' ); core.whitespace = "-blank-at-eol,blank-at-eof,space-before-tab"; + rerere.enabled = true; }; lfs.enable = true; delta = { diff --git a/patches/nixos-nixpkgs-362c2bc76d359b908ad1389ee28c23ee0e862324.patch b/patches/nixos-nixpkgs-362c2bc76d359b908ad1389ee28c23ee0e862324.patch new file mode 100644 index 0000000..dbaf9ee --- /dev/null +++ b/patches/nixos-nixpkgs-362c2bc76d359b908ad1389ee28c23ee0e862324.patch @@ -0,0 +1,26 @@ +From 362c2bc76d359b908ad1389ee28c23ee0e862324 Mon Sep 17 00:00:00 2001 +From: Ihar Hrachyshka +Date: Mon, 7 Apr 2025 21:03:09 -0400 +Subject: [PATCH] nodejs_20: fix test failure on darwin on latest MacOS 15.4 + +Signed-off-by: Ihar Hrachyshka +(cherry picked from commit 9674c1f688d12b99fbde26e6068ab62609fef3b1) +--- + pkgs/development/web/nodejs/v20.nix | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/pkgs/development/web/nodejs/v20.nix b/pkgs/development/web/nodejs/v20.nix +index b9c9345c441afa..20cceb5b5d1cda 100644 +--- a/pkgs/development/web/nodejs/v20.nix ++++ b/pkgs/development/web/nodejs/v20.nix +@@ -50,5 +50,10 @@ buildNodejs { + stripLen = 1; + hash = "sha256-6y3aEqxNC4iTQEv1oewodJrhOHxjp5xZMq1P1QL94Rg="; + }) ++ # fix test failure on macos 15.4 ++ (fetchpatch2 { ++ url = "https://github.com/nodejs/node/commit/33f6e1ea296cd20366ab94e666b03899a081af94.patch?full_index=1"; ++ hash = "sha256-aVBMcQlhQeviUQpMIfC988jjDB2BgYzlMYsq+w16mzU="; ++ }) + ] ++ gypPatches; + }