Skip to content

tsalkenov/nip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nip

Wrapper for nix-shell which adds persistence(protection from nix gc)

Installation

You can install nip by adding nip flake to your nixos configuration

# flake.nix

{
  inputs.nip.url = "github:tsalkenov/nip"; # Add flake as input

  outputs = {nixpkgs, ...} @ inputs: {
    nixosConfigurations.HOSTNAME = nixpkgs.lib.nixosSystem {
      specialArgs = { inherit inputs; }; # This is the important part
      modules = [
        ./configuration.nix
      ];
    };
  } 
}

# configuration.nix

{inputs, pkgs, ...}: {
  environment.systemPackages = with pkgs; [
    inputs.nip.packages.${system}.default # Add nip to package list
    # Other packages
  ]
}

Usage

Start nix-shell in current directory and save it:

nip # Yeah that's all

Running shell in another directory:

nip /directory/with/shell

Supported shells

Impure nix shells (shell.nix/default.nix)

First class support

Flaky dev shells (flake.nix)

Not supported yet

About

Persistent nix shell

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published