Skip to content

vicnotor/nix-devshells

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Some simple Nix devshell templates

built with nix

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.

Requirements

  • A system with Nix installed (with flakes enabled)
  • (optional) direnv installed

Installation

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.

Usage

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.

About

Some nice and instantly retrievable Nix devshell templates

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published