Highly opinionated flake templates using:
Currently this is a work in progress and things my change a lot as I experiment with what works best for me.
I plan on adding:
-
nix
-
R
-
Julia
-
C/C++
To use, specify the template with the language and project name (destination folder) when creating the project as follows:
nix flake new -t github:Leixb/flake-templates#<language> <ProjectName>
This is the default template, it gives a simple devShell
, some sane
default values for .editorconfig
and direnv
configuration.
This is an example of how to use mach-nix with flakes properly, so
that pypi-deps-db
is managed through flake inputs and there is
no need to use PypiDataRev
or PypiData
.
To use the template run:
nix flake new -t github:Leixb/flake-templates#python <ProjectName>
You can manage the Pypi
database using nix flake lock
. For example, to
update the version to latest, use: nix flake lock --update-input pypi-deps-db
Provides a shell with go
and several go development tools with GOPATH
inside
.direnv
. It also has a recipe to build a go module.
nix flake new -t github:Leixb/flake-templates#go <ProjectName>
Gives a shell with the latest JDK and sets up JDTLS with direnv. You
may need to tweak your IDE configuration to work with the given JDTLS_HOME
environment variable. For ease of use, the configuration files for JDTLS
are
put outside the nix store so they can be freely modified if needed.
nix flake new -t github:Leixb/flake-templates#java <ProjectName>
It also provides a two step maven build which needs changing the values
on the sha256
checksums manually.
Shell with cargo, rust-analyzer and other rust tooling.
nix flake new -t github:Leixb/flake-templates#rust <ProjectName>
R with tidyverse and languageserver
nix flake new -t github:Leixb/flake-templates#R <ProjectName>
LaTeX template using Leixb/latex-template. Already includes latex files to get going quickly.
nix flake new -t github:Leixb/flake-templates#latex <ProjectName>
Lua with sumneko-lua-language-server.
nix flake new -t github:Leixb/flake-templates#lua <ProjectName>