{ description = "Project templates"; 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; imports = [ inputs.treefmt-nix.flakeModule ]; flake.templates = { class = { description = "Class template"; path = ./class; }; paper = { description = "TeX paper template"; path = ./paper; }; tex = { description = "Generic TeX projects"; path = ./tex; }; }; perSystem = { config, pkgs, ... }: { treefmt = { programs = { nixfmt = { enable = true; strict = true; }; }; }; devShells.default = pkgs.mkShellNoCC { inputsFrom = [ config.treefmt.build.devShell ]; nativeBuildInputs = with pkgs; [ nixd deadnix ]; }; }; }; }