aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorChris Wells <chris@mathematicaster.org>2026-02-22 22:57:53 -0600
committerChris Wells <chris@mathematicaster.org>2026-02-22 22:57:53 -0600
commit51728e2a5b26518cecd135ef32377798c55c78d6 (patch)
treef6f31416f843e61b612ba9ea35e54db0ff515e74 /flake.nix
parentba9ba34bd10cfa59ad4fe2945eb5c9976b2b609b (diff)
downloadtex-shell-51728e2a5b26518cecd135ef32377798c55c78d6.tar
tex-shell-51728e2a5b26518cecd135ef32377798c55c78d6.tar.gz
tex-shell-51728e2a5b26518cecd135ef32377798c55c78d6.tar.bz2
tex-shell-51728e2a5b26518cecd135ef32377798c55c78d6.tar.lz
tex-shell-51728e2a5b26518cecd135ef32377798c55c78d6.tar.xz
tex-shell-51728e2a5b26518cecd135ef32377798c55c78d6.tar.zst
tex-shell-51728e2a5b26518cecd135ef32377798c55c78d6.zip
Added formatters
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix43
1 files changed, 36 insertions, 7 deletions
diff --git a/flake.nix b/flake.nix
index d17aca5..ba74979 100644
--- a/flake.nix
+++ b/flake.nix
@@ -2,18 +2,47 @@
description = "TeX devShell for flake-parts";
inputs = {
+ nixpkgs.url = "github:nixos/nixpkgs";
flake-parts.url = "github:hercules-ci/flake-parts";
+ treefmt-nix.url = "github:numtide/treefmt-nix";
systems.url = "github:nix-systems/default";
};
- outputs = inputs @ { self, flake-parts, ... }: flake-parts.lib.mkFlake { inherit self inputs; } {
- systems = import inputs.systems;
+ outputs =
+ inputs@{ self, flake-parts, ... }:
+ flake-parts.lib.mkFlake { inherit self inputs; } {
+ systems = import inputs.systems;
- flake.flakeModules.default = ./module.nix;
+ imports = [ inputs.treefmt-nix.flakeModule ];
- flake.templates.default = {
- path = ./template;
- description = "TeX-utils default template";
+ flake.flakeModules.default = ./module.nix;
+
+ flake.templates.default = {
+ path = ./template;
+ description = "TeX-utils default template";
+ };
+
+ perSystem =
+ { config, pkgs, ... }:
+ {
+ treefmt = {
+ programs = {
+ nixfmt = {
+ enable = true;
+ strict = true;
+ };
+ };
+ };
+
+ devShells.default = pkgs.mkShellNoCC {
+ inputsFrom = [ config.treefmt.build.devShell ];
+ nativeBuildInputs = with pkgs; [
+ nixd
+ statix
+ deadnix
+ ];
+ };
+
+ };
};
- };
}