aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorChris Wells <chris@mathematicaster.org>2026-02-25 10:39:15 -0600
committerChris Wells <chris@mathematicaster.org>2026-02-25 10:39:15 -0600
commitf2c4d486c0e5763b9fcd92987128df262233c1a9 (patch)
treea78ac2fcd93b60daa80eb12fc8928f251377c35f /flake.nix
downloadtemplates-f2c4d486c0e5763b9fcd92987128df262233c1a9.tar
templates-f2c4d486c0e5763b9fcd92987128df262233c1a9.tar.gz
templates-f2c4d486c0e5763b9fcd92987128df262233c1a9.tar.bz2
templates-f2c4d486c0e5763b9fcd92987128df262233c1a9.tar.lz
templates-f2c4d486c0e5763b9fcd92987128df262233c1a9.tar.xz
templates-f2c4d486c0e5763b9fcd92987128df262233c1a9.tar.zst
templates-f2c4d486c0e5763b9fcd92987128df262233c1a9.zip
Basic templates so farHEADmaster
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix55
1 files changed, 55 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..ed95723
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,55 @@
+{
+ 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
+ ];
+ };
+
+ };
+ };
+}