about summary refs log tree commit diff stats
path: root/templates/latex/letter
diff options
context:
space:
mode:
Diffstat (limited to '')
l---------[-rw-r--r--]templates/latex/letter/.envrc10
l---------[-rw-r--r--]templates/latex/letter/flake.nix101
l---------[-rwxr-xr-x]templates/latex/letter/update.sh4
3 files changed, 3 insertions, 112 deletions
diff --git a/templates/latex/letter/.envrc b/templates/latex/letter/.envrc
index 3bc1085..db044c7 100644..120000
--- a/templates/latex/letter/.envrc
+++ b/templates/latex/letter/.envrc
@@ -1,9 +1 @@
-use flake || use nix
-watch_file flake.nix
-
-PATH_add ./scripts
-
-if on_git_branch; then
-  echo && git status --short --branch &&
-  echo && git fetch --verbose
-fi
+../../../common/.envrc
\ No newline at end of file
diff --git a/templates/latex/letter/flake.nix b/templates/latex/letter/flake.nix
index 4847a9c..3c2e48b 100644..120000
--- a/templates/latex/letter/flake.nix
+++ b/templates/latex/letter/flake.nix
@@ -1,100 +1 @@
-{
-  description = "%INIT_DESCRIPTION";
-
-  inputs = {
-    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
-
-    treefmt-nix = {
-      url = "github:numtide/treefmt-nix";
-      inputs = {
-        nixpkgs.follows = "nixpkgs";
-      };
-    };
-    flake_version_update = {
-      url = "git+https://codeberg.org/soispha/flake_version_update.git";
-      inputs = {
-        systems.follows = "systems";
-        nixpkgs.follows = "nixpkgs";
-        flake-utils.follows = "flake-utils";
-      };
-    };
-
-    # inputs for following
-    systems = {
-      url = "github:nix-systems/x86_64-linux"; # only evaluate for this system
-    };
-    flake-compat = {
-      url = "github:edolstra/flake-compat";
-      flake = false;
-    };
-    flake-utils = {
-      url = "github:numtide/flake-utils";
-      inputs = {
-        systems.follows = "systems";
-      };
-    };
-  };
-
-  outputs = {
-    self,
-    nixpkgs,
-    flake-utils,
-    treefmt-nix,
-    flake_version_update,
-    ...
-  }:
-    flake-utils.lib.eachDefaultSystem (system: let
-      pkgs = nixpkgs.legacyPackages.${system};
-
-      # This version is set automatically on `cog bump --auto`;
-      version = "v%INIT_APPLICATION_VERSION"; # GUIDING VERSION STRING
-
-      # TODO reduce to the needed ones
-      texlive = pkgs.texlive.combined.scheme-full;
-
-      treefmtEval = import ./treefmt.nix {inherit treefmt-nix pkgs;};
-
-      build = pkgs.stdenv.mkDerivation {
-        pname = "%INIT_APPLICATION_NAME";
-        inherit version;
-        src = ./.;
-
-        buildInputs = [
-          texlive
-        ];
-
-        # Run local
-        preferLocalBuild = true;
-        allowSubstitutes = false;
-
-        buildPhase = ''
-          # TODO: I have no idea, why calling it with `./build.sh` does not work <2024-03-20>
-          bash ./build.sh
-        '';
-
-        installPhase = ''
-          install -D ./build/main.pdf "$out/%INIT_APPLICATION_NAME.pdf";
-        '';
-      };
-    in {
-      packages.default = build;
-
-      checks = {
-        inherit build;
-        formatting = treefmtEval.config.build.check self;
-      };
-
-      formatter = treefmtEval.config.build.wrapper;
-
-      devShells.default = pkgs.mkShell {
-        packages = with pkgs; [
-          cocogitto
-          reuse
-          flake_version_update.packages."${system}".default
-          texlive
-
-          zathura
-        ];
-      };
-    });
-}
+../../../common/flakes/latex/flake.nix
\ No newline at end of file
diff --git a/templates/latex/letter/update.sh b/templates/latex/letter/update.sh
index 49216b8..e84e4e3 100755..120000
--- a/templates/latex/letter/update.sh
+++ b/templates/latex/letter/update.sh
@@ -1,3 +1 @@
-#!/usr/bin/env sh
-
-nix flake update
+../../../common/scripts/update.sh
\ No newline at end of file