Skip to content

Commit 8a1808c

Browse files
committed
ci: switch formatter from nixpkgs-fmt to nixfmt (RFC style)
1 parent b9b7601 commit 8a1808c

2 files changed

Lines changed: 18 additions & 8 deletions

File tree

nix/checks/lint.nix

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
{ pkgs, flake, ... }:
22

33
pkgs.runCommand "lint-code"
4-
{ nativeBuildInputs = with pkgs; [ nixpkgs-fmt deadnix statix ]; } ''
5-
deadnix --fail ${flake}
6-
#statix check ${flake} # https://github.com/nerdypepper/statix/issues/75
7-
nixpkgs-fmt --check ${flake}
8-
touch $out
9-
''
4+
{
5+
nativeBuildInputs = with pkgs; [
6+
nixfmt
7+
deadnix
8+
statix
9+
];
10+
}
11+
''
12+
deadnix --fail ${flake}
13+
#statix check ${flake} # https://github.com/nerdypepper/statix/issues/75
14+
nixfmt --check ${flake}
15+
touch $out
16+
''

nix/formatter.nix

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22

33
pkgs.writeShellApplication {
44
name = "normalise_nix";
5-
runtimeInputs = with pkgs; [ nixpkgs-fmt statix ];
5+
runtimeInputs = with pkgs; [
6+
nixfmt
7+
statix
8+
];
69
text = ''
710
set -o xtrace
8-
nixpkgs-fmt "$@"
11+
nixfmt "$@"
912
statix fix "$@"
1013
'';
1114
}

0 commit comments

Comments
 (0)