From 1974b7e30c98d1dc1279c3ef4a801d7eb5a86c43 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Thu, 21 Aug 2025 16:28:35 +0100 Subject: [PATCH 1/3] ci: reformat comment Use one sentence per line. --- ci/default.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ci/default.nix b/ci/default.nix index 9be9aa93aea7..a38d2dae539e 100644 --- a/ci/default.nix +++ b/ci/default.nix @@ -60,8 +60,7 @@ let programs.keep-sorted.enable = true; - # This uses nixfmt underneath, - # the default formatter for Nix code. + # This uses nixfmt underneath, the default formatter for Nix code. # See https://github.com/NixOS/nixfmt programs.nixfmt.enable = true; From e981b17a9626bf52de0867a5c42067704e10ad5c Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Thu, 21 Aug 2025 16:29:32 +0100 Subject: [PATCH 2/3] ci: explicitly define `programs.nixfmt.package` Currently treefmt-nix is still defaulting `programs.nixfmt.package` to the `nixfmt-rfc-style` alias. This makes sense, as they do not know for certain which revision of nixpkgs is in use. We do know, however, so we can explicitly use the non-alias name. --- ci/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ci/default.nix b/ci/default.nix index a38d2dae539e..6aa82cb716e5 100644 --- a/ci/default.nix +++ b/ci/default.nix @@ -62,7 +62,10 @@ let # This uses nixfmt underneath, the default formatter for Nix code. # See https://github.com/NixOS/nixfmt - programs.nixfmt.enable = true; + programs.nixfmt = { + enable = true; + package = pkgs.nixfmt; + }; programs.yamlfmt = { enable = true; From f646e56d7af1aded3eea109b949a4acdd925f307 Mon Sep 17 00:00:00 2001 From: Matt Sturgeon Date: Thu, 21 Aug 2025 16:31:30 +0100 Subject: [PATCH 3/3] ci: disable aliases in CI's pkgs instance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This ensures we don't accidentally use aliases in the nixpkgs shell or other places that depend on the CI-pinned pkgs instance. Nixpkgs generally — and CI specifically — do not use aliases, because we want to ensure they are not load-bearing and can be removed safely. See: https://github.com/NixOS/nixpkgs/blob/ce9979ec1c/pkgs/top-level/release-outpaths.nix#L28 --- ci/default.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ci/default.nix b/ci/default.nix index 6aa82cb716e5..da6e3f877e3b 100644 --- a/ci/default.nix +++ b/ci/default.nix @@ -17,7 +17,12 @@ let else nixpkgs; - pkgs = import nixpkgs' { inherit system; }; + pkgs = import nixpkgs' { + inherit system; + # Nixpkgs generally — and CI specifically — do not use aliases, + # because we want to ensure they are not load-bearing. + allowAliases = false; + }; fmt = let