Skip to content

Commit a7ebf96

Browse files
committed
chore(nix): add formatter
1 parent cc79729 commit a7ebf96

2 files changed

Lines changed: 19 additions & 10 deletions

File tree

flake.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,14 @@
3131
};
3232
in
3333
{
34+
formatter = eachSupportedSystem (
35+
system:
36+
let
37+
pkgs = import nixpkgs { inherit system; };
38+
in
39+
pkgs.nixfmt-tree
40+
);
41+
3442
devShells = eachSupportedSystem mkDevShells;
3543
};
3644
}

shell.nix

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# Compatiblity file for non-flake Nix users.
22
#
33
# <https://github.com/edolstra/flake-compat>
4-
(import
5-
(
6-
let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
7-
fetchTarball {
8-
url = lock.nodes.flake-compat.locked.url or "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
9-
sha256 = lock.nodes.flake-compat.locked.narHash;
10-
}
11-
)
12-
{ src = ./.; }
13-
).shellNix
4+
(import (
5+
let
6+
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
7+
in
8+
fetchTarball {
9+
url =
10+
lock.nodes.flake-compat.locked.url
11+
or "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
12+
sha256 = lock.nodes.flake-compat.locked.narHash;
13+
}
14+
) { src = ./.; }).shellNix

0 commit comments

Comments
 (0)