diff options
| author | Chris Wells <chris@mathematicaster.org> | 2026-02-22 22:57:53 -0600 |
|---|---|---|
| committer | Chris Wells <chris@mathematicaster.org> | 2026-02-22 22:57:53 -0600 |
| commit | 51728e2a5b26518cecd135ef32377798c55c78d6 (patch) | |
| tree | f6f31416f843e61b612ba9ea35e54db0ff515e74 /flake.nix | |
| parent | ba9ba34bd10cfa59ad4fe2945eb5c9976b2b609b (diff) | |
| download | tex-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.nix | 43 |
1 files changed, 36 insertions, 7 deletions
@@ -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 + ]; + }; + + }; }; - }; } |
