Find a file
2024-02-16 11:57:12 +01:00
rust fix some issues with rust template's rename 2023-11-04 12:24:39 +01:00
scripts add: beste-schule 2023-09-20 09:51:25 +02:00
.envrc improve default shell 2023-11-04 20:45:59 +01:00
.gitignore flake-parts and new rust template 2023-11-04 11:44:12 +01:00
flake.lock improve default shell 2023-11-04 20:45:59 +01:00
flake.nix feat: add onefetch and pre-commit to all shells 2024-02-16 11:57:12 +01:00
LICENSE Formatting, LICENSE 2022-08-26 17:22:00 +02:00
README.md Add README.md 2023-11-04 12:12:32 +01:00

Development environments

Powered with Nix ❄️ , Nix Flakes, and direnv. Only usefull if you have Nix installed.

Shells

A few custom development shells are available. Use with

direnv

Create a .envrc file with the following contents to use a generic nix-shell

use flake git+https://git.tammena.me/megamanmalte/dev?ref=main#nix

See below for other shell options.

nix develop

Simply run the following to enter a generic nix shell

nix develop git+https://git.tammena.me/megamanmalte/dev?ref=main#nix

See below for other shell options.

Templates

Rust 🦀

Initialize a new Rust project with either

nix flake new NEW_PROJECT_DIR -t git+https://git.tammena.me/megamanmalte/dev?ref=main#rust

to create a new directory NEW_PROJECT_DIR. Or run

nix flake init -t git+https://git.tammena.me/megamanmalte/dev?ref=main#rust

to create the template inside the current directory

The layout is as follows

  .
 ├──  .envrc
 │     To load the defined shell, in case you run direnv
 ├──  .gitignore
 ├──  Cargo.lock
 ├──  Cargo.toml
 ├──  flake.lock
 ├──  flake.nix
 │     Heart of the repo, defines a development shell and a package, try `nix flake show`
 ├──  nix
 │  └──  packages
 │     └──  change-my-name.nix
 │           The package definitions, try `nix run`, it will build this package
 └──  src
    │  YOUR future code lives here
    └──  main.rs

After running either of the above commands, you will probably want to rename your project

rename YOUR_NEW_COOL_PROJECT_NAME

Output Tree

nix flake show:

dev
├───devShells
│   └───x86_64-linux
│       ├───beste-schule: development environment 'beste.schule'
│       ├───markdown: development environment 'generic-markdown'
│       ├───nix: development environment 'generic-nix'
│       ├───node: development environment 'generic-node'
│       ├───nodeIonic: development environment 'generic-node-+-ionic'
│       ├───nodePhp: development environment 'generic-node-+-php'
│       ├───php: development environment 'generic-php'
│       └───python: development environment 'generic-python'
├───hydraJobs [omitted]
├───packages
│   └───x86_64-linux
│       └───mdpls: package 'mdpls-30761508593d85b5743ae39c4209947740eec92d'
└───templates
    └───rust: template: Simple Rust + Nix template