initial commit
This commit is contained in:
commit
f1b9082f4e
15 changed files with 498 additions and 0 deletions
46
template/devshell.toml
Normal file
46
template/devshell.toml
Normal file
|
@ -0,0 +1,46 @@
|
|||
imports = [ "git/hooks" ]
|
||||
packages = [ "texliveWithTubslatex", "inotify-tools" ]
|
||||
|
||||
[devshell]
|
||||
name = "thesis"
|
||||
|
||||
[[commands]]
|
||||
name = "format"
|
||||
command = "nix fmt"
|
||||
help = "Formats the nix files"
|
||||
category = "development"
|
||||
|
||||
[[commands]]
|
||||
name = "update"
|
||||
command = "nix flake update --commit-lock-file"
|
||||
help = "Updates the dependencies"
|
||||
category = "development"
|
||||
|
||||
[[commands]]
|
||||
name = "check"
|
||||
command = "nix flake check"
|
||||
help = "Checks if this flake is valid"
|
||||
category = "development"
|
||||
|
||||
[[commands]]
|
||||
name = "build-thesis"
|
||||
command = "make thesis.pdf"
|
||||
category = "outputs"
|
||||
help = "Builds the thesis"
|
||||
|
||||
[[commands]]
|
||||
name = "clean"
|
||||
command = "make clean"
|
||||
category = "outputs"
|
||||
help = "Cleans the build directory"
|
||||
|
||||
[git.hooks]
|
||||
enable = true
|
||||
|
||||
[git.hooks.pre-commit]
|
||||
text = """
|
||||
FILES=$(git diff --cached --name-only --diff-filter=ACMR -- *.nix| sed -e 's| |\\ |g')
|
||||
[ -z "$FILES" ] && exit 0
|
||||
echo $FILES | xargs nix fmt
|
||||
echo $FILES | xargs git add
|
||||
exit 0"""
|
Loading…
Add table
Add a link
Reference in a new issue