Skip to content

Commit f3c98f5

Browse files
committed
Updates
1 parent 05cdb18 commit f3c98f5

File tree

3 files changed

+55
-7
lines changed

3 files changed

+55
-7
lines changed

flake.lock

Lines changed: 39 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,28 @@
44
inputs = {
55
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
66
flake-utils.url = "github:numtide/flake-utils";
7+
treefmt-nix.url = "github:numtide/treefmt-nix";
78
};
89

910
outputs =
10-
{ flake-utils, nixpkgs, ... }:
11+
{
12+
flake-utils,
13+
nixpkgs,
14+
treefmt-nix,
15+
...
16+
}:
1117
flake-utils.lib.eachDefaultSystem (
1218
system:
1319
let
1420
pkgs = import nixpkgs { inherit system; };
21+
treefmtEval = treefmt-nix.lib.evalModule pkgs {
22+
projectRootFile = "flake.nix";
23+
programs.nixfmt-rfc-style.enable = true;
24+
programs.shfmt.enable = true;
25+
};
1526
in
1627
{
17-
formatter = pkgs.nixfmt-rfc-style;
28+
formatter = treefmtEval.config.build.wrapper;
1829
devShells.default = import ./nix/shells/nix.nix { inherit pkgs; };
1930
}
2031
);

scripts/igm-update

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ DOTFILES=$HOME/dotfiles
44
source $DOTFILES/scripts/igm-helpers.sh
55

66
cd $DOTFILES
7-
zsh -c 'nixfmt **/*.nix'
87

98
nix_cmd flake update $DOTFILES/nix
109
nix_cmd flake update
10+
11+
nix_cmd fmt $DOTFILES/nix
12+
nix_cmd fmt
1113
git add .
1214

1315
FLAKE_PATH=$(flake_path)

0 commit comments

Comments
 (0)