Skip to content

Commit f136e01

Browse files
committed
Switch Nix formatter to nixfmt
1 parent 759750d commit f136e01

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,30 @@ on:
99
jobs:
1010
checks:
1111
name: Run all checks
12-
runs-on: ubuntu-22.04
12+
runs-on: ubuntu-24.04
1313
steps:
1414
- uses: actions/checkout@v5
1515
- uses: DeterminateSystems/determinate-nix-action@v3
1616
- uses: DeterminateSystems/flakehub-cache-action@main
17+
18+
- name: Check Nix formatting
19+
run: git ls-files '*.nix' | xargs nix develop --command nixfmt --check
20+
1721
- name: Install pnpm dependencies
1822
run: nix develop --command pnpm install
19-
- name: Check formatting
20-
run: nix develop --command pnpm run check-fmt
23+
2124
- name: Lint
2225
run: nix develop --command pnpm run lint
26+
2327
- name: Run test suite
2428
run: nix develop --command pnpm run test
29+
2530
- name: Build
2631
run: nix develop --command pnpm run build
32+
2733
- name: Check git status
2834
run: git status --porcelain=v1
35+
2936
- name: Ensure no staged changes
3037
run: git diff --exit-code
3138

flake.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,24 @@
2323
inputs.nixpkgs.lib.genAttrs supportedSystems (
2424
system:
2525
f {
26+
inherit system;
2627
pkgs = import inputs.nixpkgs { inherit system; };
2728
}
2829
);
2930
in
3031
{
3132
inherit (inputs.flake-schemas) schemas;
3233

33-
formatter = forEachSupportedSystem ({ pkgs }: pkgs.nixfmt-rfc-style);
34+
formatter = forEachSupportedSystem ({ pkgs, ... }: pkgs.nixfmt-rfc-style);
3435

3536
devShells = forEachSupportedSystem (
36-
{ pkgs }:
37+
{ pkgs, system }:
3738
{
3839
default = pkgs.mkShellNoCC {
3940
packages = with pkgs; [
4041
nodejs_latest
4142
nodePackages_latest.pnpm
42-
nixpkgs-fmt
43+
self.formatter.${system}
4344
];
4445
};
4546
}

0 commit comments

Comments
 (0)