sincerity.network/shell.nix

20 lines
789 B
Nix
Raw Normal View History

2022-09-23 19:08:07 -07:00
# Shell for bootstrapping flake-enabled nix and home-manager
{ pkgs ? let
# If pkgs is not defined, instanciate nixpkgs from locked commit
lock = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.nixpkgs.locked;
nixpkgs = fetchTarball {
url = "https://github.com/nixos/nixpkgs/archive/${lock.rev}.tar.gz";
sha256 = lock.narHash;
};
system = builtins.currentSystem;
overlays = [ ]; # Explicit blank overlay to avoid interference
in
import nixpkgs { inherit system overlays; }
2022-10-03 00:09:27 -07:00
, agenix
2022-09-23 19:08:07 -07:00
, ...
}: pkgs.mkShell {
# Enable experimental features without having to specify the argument
NIX_CONFIG = "experimental-features = nix-command flakes";
2022-10-03 00:09:27 -07:00
nativeBuildInputs = with pkgs; [ nix home-manager git ] ++ agenix.defaultPackage.x86_64-linux;
2022-09-23 19:08:07 -07:00
}