mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 15:11:34 +01:00
Switch to the formatting tool treefmt
This commit is contained in:
parent
003b0151f9
commit
f5a827eacf
2 changed files with 31 additions and 1 deletions
21
flake.lock
generated
21
flake.lock
generated
|
|
@ -212,6 +212,7 @@
|
|||
"nix-vscode-extensions": "nix-vscode-extensions",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"sops-nix": "sops-nix",
|
||||
"treefmt-nix": "treefmt-nix",
|
||||
"wrapper-manager": "wrapper-manager"
|
||||
}
|
||||
},
|
||||
|
|
@ -251,6 +252,26 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1720507012,
|
||||
"narHash": "sha256-QIeZ43t9IVB4dLsFaWh2f4C7JSRfK7p+Y1U9dULsLXU=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "8b63fe8cf7892c59b3df27cbcab4d5644035d72f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"wrapper-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
|
|
|||
11
flake.nix
11
flake.nix
|
|
@ -28,6 +28,11 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
treefmt-nix = {
|
||||
url = "github:numtide/treefmt-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nix-vscode-extensions = {
|
||||
url = "github:nix-community/nix-vscode-extensions";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
@ -74,6 +79,10 @@
|
|||
|
||||
devShells.${system}.default = pkgs.mkShell { packages = [ pkgs.sops ]; };
|
||||
|
||||
formatter.${system} = pkgs.nixfmt-rfc-style;
|
||||
formatter.${system} =
|
||||
(inputs.treefmt-nix.lib.evalModule pkgs {
|
||||
projectRootFile = "flake.nix";
|
||||
programs.nixfmt-rfc-style.enable = true;
|
||||
}).config.build.wrapper;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue