Reorganize devshells
This commit is contained in:
parent
e250b595e3
commit
1dd0a5e0ca
44 changed files with 269 additions and 327 deletions
devshells/bootstrap
8
devshells/bootstrap/nixpkgs.nix
Normal file
8
devshells/bootstrap/nixpkgs.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
# A nixpkgs instance that is grabbed from the pinned nixpkgs commit in the lock file
|
||||
# This is useful to avoid using channels when using legacy nix commands
|
||||
let lock = (builtins.fromJSON (builtins.readFile ../../flake.lock)).nodes.nixpkgs.locked;
|
||||
in
|
||||
import (fetchTarball {
|
||||
url = "https://github.com/nixos/nixpkgs/archive/${lock.rev}.tar.gz";
|
||||
sha256 = lock.narHash;
|
||||
})
|
7
devshells/bootstrap/shell.nix
Normal file
7
devshells/bootstrap/shell.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Shell for bootstrapping flake-enabled nix and home-manager
|
||||
{ pkgs ? (import ./nixpkgs.nix) { }, ... }:
|
||||
pkgs.mkShell {
|
||||
# Enable experimental features without having to specify the argument
|
||||
NIX_CONFIG = "experimental-features = nix-command flakes";
|
||||
packages = with pkgs; [ nix home-manager git ];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue