From 996ea4515320162d71365404c42680142981cbf4 Mon Sep 17 00:00:00 2001 From: bluepython508 Date: Wed, 1 Nov 2023 08:54:36 +0000 Subject: [PATCH] Environment --- .envrc | 1 + .gitignore | 3 +++ flake.lock | 24 ++++++++++++++++++++++++ flake.nix | 10 ++++++++++ 4 files changed, 38 insertions(+) create mode 100644 .envrc create mode 100644 .gitignore create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..48c4576 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.pdf +latex.out/ +.direnv diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..1aba91b --- /dev/null +++ b/flake.lock @@ -0,0 +1,24 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1695830400, + "narHash": "sha256-gToZXQVr0G/1WriO83olnqrLSHF2Jb8BPcmCt497ro0=", + "path": "/nix/store/8lg5579v1k5mc63ypzfagrcl8l32x3bh-source", + "rev": "8a86b98f0ba1c405358f1b71ff8b5e1d317f5db2", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..81955cc --- /dev/null +++ b/flake.nix @@ -0,0 +1,10 @@ +{ + description = ""; + outputs = { self, nixpkgs }: let pkgs = nixpkgs.legacyPackages.aarch64-darwin; lib = nixpkgs.lib; in { + devShells.aarch64-darwin.default = pkgs.mkShell { + packages = with pkgs; [latexrun texlive.combined.scheme-full entr texlab (writeShellScriptBin "livetex" '' + ${pkgs.coreutils}/bin/ls *.tex | ${entr}/bin/entr -c -s "${latexrun}/bin/latexrun -Wall '$1' && echo Compiled at \$(${pkgs.coreutils}/bin/date)" + '')]; + }; + }; +}