Clear $NIX_PATH
Ensure that $NIX_PATH is empty using a .envrc file. nix.dev considers references
to <nixpkgs>, <briefcase>, <depot>, <unstable> to be an anti-pattern because it
hinders reproducibility by introducing an implicit environment.
This repository is chock-full of references to
<{nixpkgs,unstable,briefcase,depot}>, so right now everything is broken.
			
			
This commit is contained in:
		
							parent
							
								
									e4ddc3ba75
								
							
						
					
					
						commit
						eb1af216cf
					
				
					 2 changed files with 23 additions and 5 deletions
				
			
		
							
								
								
									
										6
									
								
								.envrc
									
										
									
									
									
								
							
							
						
						
									
										6
									
								
								.envrc
									
										
									
									
									
								
							| 
						 | 
					@ -1,6 +1,10 @@
 | 
				
			||||||
export BRIEFCASE="$(realpath ~/briefcase)"
 | 
					export BRIEFCASE="$(realpath ~/briefcase)"
 | 
				
			||||||
export DEPOT="$(realpath ~/depot)"
 | 
					export DEPOT="$(realpath ~/depot)"
 | 
				
			||||||
export NIXPKGS="$(realpath ~/nixpkgs)"
 | 
					export NIXPKGS="$(realpath ~/nixpkgs)"
 | 
				
			||||||
export NIX_PATH="nixpkgs=${NIXPKGS}:unstable=$(realpath ~/nixpkgs-channels):depot=${DEPOT}:briefcase=${BRIEFCASE}";
 | 
					# I'm ensuring that $NIX_PATH is unset to avoid the anti-pattern of depending on
 | 
				
			||||||
 | 
					# <nixpkgs>, <briefcase>, <depot>, <unstable>.
 | 
				
			||||||
 | 
					# For more information about setting this to "", see:
 | 
				
			||||||
 | 
					# https://nix.dev/tutorials/towards-reproducibility-pinning-nixpkgs.html#pinning-nixpkgs
 | 
				
			||||||
 | 
					export NIX_PATH="";
 | 
				
			||||||
export DESKTOP="zeno.lon.corp.google.com";
 | 
					export DESKTOP="zeno.lon.corp.google.com";
 | 
				
			||||||
export LAPTOP="seneca";
 | 
					export LAPTOP="seneca";
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										22
									
								
								default.nix
									
										
									
									
									
								
							
							
						
						
									
										22
									
								
								default.nix
									
										
									
									
									
								
							| 
						 | 
					@ -1,10 +1,24 @@
 | 
				
			||||||
{ ... }:
 | 
					{ ... }:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
let
 | 
					let
 | 
				
			||||||
  readTree = import <depot/nix/readTree> {} {
 | 
					  depot = import (builtins.fetchGit {
 | 
				
			||||||
    pkgs      = import <nixpkgs> {};
 | 
					    url = "https://cl.tvl.fyi/depot";
 | 
				
			||||||
    depot     = import <depot> {};
 | 
					    rev = "a2e86152401c7c531801c79347c3f15e1806aabc";
 | 
				
			||||||
    briefcase = import <briefcase> {};
 | 
					  }) {};
 | 
				
			||||||
 | 
					  readTree = depot.readTree {
 | 
				
			||||||
 | 
					    pkgs = import (builtins.fetchGit {
 | 
				
			||||||
 | 
					      url = "https://github.com/NixOS/nixpkgs";
 | 
				
			||||||
 | 
					      rev = "f1a79c86358c5464c64b4fad00fca07a10e62a74";
 | 
				
			||||||
 | 
					    }) {};
 | 
				
			||||||
 | 
					    unstable = import (builtins.fetchGit {
 | 
				
			||||||
 | 
					      url = "https://github.com/NixOS/nixpkgs";
 | 
				
			||||||
 | 
					      rev = "b3251e04ee470c20f81e75d5a6080ba92dc7ed3f";
 | 
				
			||||||
 | 
					    }) {};
 | 
				
			||||||
 | 
					    briefcase = import (builtins.path {
 | 
				
			||||||
 | 
					      path = ./.;
 | 
				
			||||||
 | 
					      name = "briefcase";
 | 
				
			||||||
 | 
					    }) {};
 | 
				
			||||||
 | 
					    depot = depot;
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
in {
 | 
					in {
 | 
				
			||||||
  nixos       = readTree ./nixos;
 | 
					  nixos       = readTree ./nixos;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue