diff options
| author | Miran Bastaja <miran.bastaja04@gmail.com> | 2024-08-05 10:55:47 +0200 |
|---|---|---|
| committer | Miran Bastaja <miran.bastaja04@gmail.com> | 2024-08-06 08:07:32 +0200 |
| commit | 0c5caf0a9d46a66862c7382c77a5e3f7b2c9ed34 (patch) | |
| tree | c9c19c52e8146685d192272921d667a71c5feccc /flake.nix | |
| parent | b7754efb614a895667a2482722c423e7bf7d2f43 (diff) | |
Use nix to configure treefmt
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 24 |
1 files changed, 17 insertions, 7 deletions
@@ -37,31 +37,41 @@ url = "github:nlewo/comin"; inputs.nixpkgs.follows = "nixpkgs"; }; + + # development stuff + treefmt-nix = { + url = "github:numtide/treefmt-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { + self, nixpkgs, futils, nix-on-droid, + treefmt-nix, ... }@inputs: futils.lib.eachSystem ( system: let - pkgs = inputs.nixpkgs.legacyPackages.${system}; + pkgs = import inputs.nixpkgs { inherit system; }; + treefmtEval = treefmt-nix.lib.evalModule pkgs ./treefmt.nix; in { devShells.default = futils.lib.minimalMkShell pkgs { - buildInputs = with pkgs; [ - git + packages = with pkgs; [ + gitMinimal sops - - # Formatting - treefmt - nixfmt-rfc-style ]; }; + + formatter = treefmtEval.config.build.wrapper; + checks = { + formatting = treefmtEval.config.build.check self; + }; } ) // { |
