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:vicnotor/nix-devshells";
inputs.nixpkgs.follows = "nixpkgs";
};
...
};
...
And then add it either environment.systemPackages
or home.packages
as
inputs.nix-devshells.packages.${pkgs.system}.default
Then 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 $template
where $template
is one of the directory names inside
src/templates.
This will copy the flake.nix
, flake.lock
, and .envrc
files from that
directory to your current directory. You can then run
direnv allow
or
nix develop
to activate the development environment, depending on if you have direnv installed or not.