Reformat all projects; switch to overlay format
This commit is contained in:
		
							parent
							
								
									bf45826289
								
							
						
					
					
						commit
						fca8041d90
					
				
					 30 changed files with 532 additions and 600 deletions
				
			
		| 
						 | 
				
			
			@ -6,26 +6,30 @@
 | 
			
		|||
    nixpkgs.url = "github:NixOS/nixpkgs";
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  outputs = { self, flake-utils, nixpkgs }:
 | 
			
		||||
  outputs =
 | 
			
		||||
    { self
 | 
			
		||||
    , flake-utils
 | 
			
		||||
    , nixpkgs
 | 
			
		||||
    }:
 | 
			
		||||
 | 
			
		||||
    flake-utils.lib.eachDefaultSystem (system:
 | 
			
		||||
      let
 | 
			
		||||
        nodeOverlay = self: super: rec {
 | 
			
		||||
    let
 | 
			
		||||
      overlays = [
 | 
			
		||||
        (self: super: rec {
 | 
			
		||||
          nodejs = super.nodejs-18_x;
 | 
			
		||||
          pnpm = super.nodePackages.pnpm;
 | 
			
		||||
          yarn = (super.yarn.override { inherit nodejs; });
 | 
			
		||||
        };
 | 
			
		||||
        overlays = [ nodeOverlay ];
 | 
			
		||||
        pkgs = import nixpkgs { inherit overlays system; };
 | 
			
		||||
      in
 | 
			
		||||
      {
 | 
			
		||||
        devShells = {
 | 
			
		||||
          default = pkgs.mkShell {
 | 
			
		||||
            buildInputs = with pkgs; [ node2nix nodejs pnpm yarn ];
 | 
			
		||||
        })
 | 
			
		||||
      ];
 | 
			
		||||
      pkgs = import nixpkgs { inherit overlays system; };
 | 
			
		||||
    in
 | 
			
		||||
    {
 | 
			
		||||
      devShell = pkgs.mkShell {
 | 
			
		||||
        buildInputs = with pkgs; [ node2nix nodejs pnpm yarn ];
 | 
			
		||||
 | 
			
		||||
            shellHook = ''
 | 
			
		||||
              echo "node `${pkgs.nodejs}/bin/node --version`"
 | 
			
		||||
            '';
 | 
			
		||||
          };
 | 
			
		||||
        };
 | 
			
		||||
      });
 | 
			
		||||
        shellHook = ''
 | 
			
		||||
          echo "node `${pkgs.nodejs}/bin/node --version`"
 | 
			
		||||
        '';
 | 
			
		||||
      };
 | 
			
		||||
    });
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue