aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorMiran Bastaja <miran.bastaja04@gmail.com>2024-08-05 10:55:47 +0200
committerMiran Bastaja <miran.bastaja04@gmail.com>2024-08-06 08:07:32 +0200
commit0c5caf0a9d46a66862c7382c77a5e3f7b2c9ed34 (patch)
treec9c19c52e8146685d192272921d667a71c5feccc /flake.nix
parentb7754efb614a895667a2482722c423e7bf7d2f43 (diff)
Use nix to configure treefmt
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix24
1 files changed, 17 insertions, 7 deletions
diff --git a/flake.nix b/flake.nix
index 8324f07..361061c 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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;
+ };
}
)
// {