Compare commits
2 commits
ba18e97277
...
19be2c3635
Author | SHA1 | Date | |
---|---|---|---|
|
19be2c3635 | ||
|
36f1035956 |
2 changed files with 38 additions and 2 deletions
30
README.md
30
README.md
|
@ -1,3 +1,31 @@
|
|||
# texTemplate
|
||||
This is a nix flake that can reproducible build your tex document
|
||||
and configures some environments to write texfiles as nix devShells
|
||||
|
||||
a latex template
|
||||
## Name
|
||||
There is a comment `# name to be used as indentifier for editor environments and such`
|
||||
Set the `name` parameter below to something sensible.
|
||||
|
||||
## Dependencies
|
||||
There is a line with a comment above called `# LaTex package dependencies`.
|
||||
Here you put your latex package depencies (see the `nixpkgs.texlive` for working
|
||||
values.
|
||||
|
||||
## devShells
|
||||
There is a `default` devShell you can set it to something different right now it is kakoune.
|
||||
|
||||
### kakoune
|
||||
The default devShell gives you a kakoune with configured texlab lsp, and a zathura viewer
|
||||
with configured auto build and forwardSearch on save. Backward search is not configured right now.
|
||||
The relevant config files are completly contained in the flake, you can edit them to your liking.
|
||||
|
||||
It starts kakoune as a background server. It is your job to clean it up afterwards. Also if
|
||||
you want to use the fzf plugin you should be in some environment that can handle shell windows
|
||||
(like kitty or tmux). And because of my old habit to start my editor as `vim` there is a alias
|
||||
that you should use called `vim` to access the started kakoune session.
|
||||
|
||||
### texStudio
|
||||
This is what it sounds, it is a shell with texStudio available, it should autostart
|
||||
|
||||
### texMaker
|
||||
The same as texStudion just with texMaker
|
||||
|
|
10
flake.nix
10
flake.nix
|
@ -52,6 +52,7 @@
|
|||
let
|
||||
pkgs = nixpkgsFor.${system};
|
||||
in ( rec {
|
||||
# This sets the default devShell
|
||||
default = kakoune;
|
||||
kakoune =
|
||||
let
|
||||
|
@ -107,10 +108,11 @@
|
|||
pkgs.mkShellNoCC {
|
||||
inputsFrom = [self.outputs.packages.${system}.default];
|
||||
packages = [myKakoune texlab pkgs.git pkgs.zathura pkgs.fzf];
|
||||
# TODO only try to start the kakoune session if no session with that
|
||||
# name exists
|
||||
shellHook = ''
|
||||
alias ..="cd .."
|
||||
mkdir -p ${latexTmpDir}
|
||||
touch /tmp/texlabLog
|
||||
export KAKOUNE_CONFIG_DIR="/dev/null/"
|
||||
kak -d -s ${name} &
|
||||
alias vim="kak -c ${name}"
|
||||
|
@ -120,12 +122,18 @@
|
|||
pkgs.mkShellNoCC {
|
||||
inputsFrom = [self.outputs.packages.${system}.default];
|
||||
packages = [pkgs.texstudio pkgs.git];
|
||||
shellHook = ''
|
||||
texstudio
|
||||
'';
|
||||
};
|
||||
|
||||
texmaker =
|
||||
pkgs.mkShellNoCC {
|
||||
inputsFrom = [self.outputs.packages.${system}.default];
|
||||
packages = [pkgs.texmaker pkgs.git];
|
||||
shellHook = ''
|
||||
texmaker
|
||||
'';
|
||||
};
|
||||
})
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue