refactor: pull bootstap into regular shell for ease of use
This commit is contained in:
parent
8d9684cf50
commit
c5d2fbe031
3 changed files with 17 additions and 7 deletions
|
|
@ -89,13 +89,6 @@
|
|||
alejandra
|
||||
];
|
||||
};
|
||||
|
||||
# Shell for bootstrapping flake-enabled nix and home-manager
|
||||
bootstrap = pkgs.mkShell {
|
||||
# Enable experimental features without having to specify the argument
|
||||
NIX_CONFIG = "experimental-features = nix-command flakes";
|
||||
nativeBuildInputs = with pkgs; [nix home-manager git];
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
|||
9
nixpkgs.nix
Normal file
9
nixpkgs.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# 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;
|
||||
})
|
||||
8
shell.nix
Normal file
8
shell.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# Shell for bootstrapping flake-enabled nix and home-manager
|
||||
{pkgs ? (import ./nixpkgs.nix) {}}: {
|
||||
bootstrap = pkgs.mkShell {
|
||||
# Enable experimental features without having to specify the argument
|
||||
NIX_CONFIG = "experimental-features = nix-command flakes";
|
||||
nativeBuildInputs = with pkgs; [nix home-manager git];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue