aboutsummaryrefslogtreecommitdiffhomepage
path: root/flake.nix
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-04-05 00:18:52 +0900
committernsfisis <nsfisis@gmail.com>2025-04-05 00:18:52 +0900
commitfea57b8e27a438fe8f2341b6cb21b73962b7504a (patch)
tree87879cc3901f7bd6218b04a0001e0aad8bfa153f /flake.nix
parent3a4e0333679ba6bc09e919eba0d15ca1cdb08461 (diff)
downloaddotfiles-fea57b8e27a438fe8f2341b6cb21b73962b7504a.tar.gz
dotfiles-fea57b8e27a438fe8f2341b6cb21b73962b7504a.tar.zst
dotfiles-fea57b8e27a438fe8f2341b6cb21b73962b7504a.zip
nix: introduce treefmt-nix "nix fmt"
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix9
1 files changed, 8 insertions, 1 deletions
diff --git a/flake.nix b/flake.nix
index 17260b1..54be09b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -14,6 +14,11 @@
flake-utils.url = "github:numtide/flake-utils";
+ treefmt-nix = {
+ url = "github:numtide/treefmt-nix";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
@@ -24,6 +29,7 @@
{
nixpkgs,
flake-utils,
+ treefmt-nix,
home-manager,
...
}:
@@ -31,9 +37,10 @@
system:
let
pkgs = import nixpkgs { inherit system; };
+ treefmt = treefmt-nix.lib.evalModule pkgs ./treefmt.nix;
in
{
- formatter = pkgs.nixfmt-rfc-style;
+ formatter = treefmt.config.build.wrapper;
}
)
// {