This very simple project lets you import simple
Nix development shells
to your current directory through the mydev command. You can then use
these shells to develop your projects and manage your dependencies
the Nix way!
These devshells are made for myself, so you should modify each flake.nix file for your own needs.
This project is heavily inspired by and copied from the-nix-way/dev-templates.
Add this project's flake to your NixOS or home-manager flake inputs:
...
inputs = {
...
nix-devshells = {
url = "github:vicgeentor/nix-devshells";
inputs.nixpkgs.follows = "nixpkgs";
};
...
};
...And then add it either environment.systemPackages or home.packages as
inputs.nix-devshells.packages.${pkgs.system}.defaultThen rebuild your NixOS or home-manager system.
[!TIP] If you are unfamiliar with these practices, check out this amazing source to learn how Nix flakes work and how they make your development life easier.
mydev $templatewhere $template is one of the directory names inside
src/templates.
This will copy flake.nix, flake.lock, .envrc, and .gitignore from the template
directory that you chose to your current directory. You can then run
direnv allowor
nix developto activate the development environment, depending on if you have direnv installed or not.