Files
nix-config/shell.nix
2025-05-26 23:55:11 -03:00

44 lines
1.2 KiB
Nix

# Shell for bootstrapping flake-enabled nix and other tooling
{
pkgs ?
# If pkgs is not defined, instantiate nixpkgs from locked commit
let
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;
};
in
import nixpkgs {overlays = [];},
...
}: {
default = pkgs.mkShell {
NIX_CONFIG = "extra-experimental-features = nix-command flakes";
BOOTSTRAP_USER = "panotaka";
BOOTSTRAP_SSH_PORT = "22";
BOOTSTRAP_SSH_KEY = "~/.ssh/id_manu";
nativeBuildInputs = builtins.attrValues {
inherit
(pkgs)
# NOTE(starter): add any packages you want available in the shell when accessing the parent directory.
# These will be installed regardless of what was installed specific for the host or home configs
nix
home-manager
nil
alejandra
nh
git
just
pre-commit
deadnix
sops
yq-go # jq for yaml, used for build scripts
bats # for bash testing
age # for bootstrap script
ssh-to-age # for bootstrap script
;
};
};
}