This repository has been archived on 2024-07-08. You can view files and clone it, but cannot push or open issues or pull requests.
nix-config-tn/shell.nix

53 lines
1.2 KiB
Nix
Raw Normal View History

2024-03-18 04:02:10 -05:00
# Shell for bootstrapping flake-enabled nix and home-manager
{ pkgs ? let
# If pkgs is not defined, instantiate nixpkgs from locked commit
lock = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.nixpkgs.locked;
2024-03-17 16:04:32 -05:00
nixpkgs = fetchTarball {
url = "https://github.com/nixos/nixpkgs/archive/${lock.rev}.tar.gz";
sha256 = lock.narHash;
};
2024-03-18 04:02:10 -05:00
system = builtins.currentSystem;
overlays = [ ]; # Explicit blank overlay to avoid interference
2024-03-17 16:04:32 -05:00
in
2024-03-18 04:02:10 -05:00
import nixpkgs { inherit system overlays; }
, ...
}:
let
# setup the ssssnaaake
my-python = pkgs.python311;
python-with-my-packages = my-python.withPackages
(p: with p; [
mkdocs-material
mkdocs-minify
pygments
]);
in
pkgs.mkShell {
# Enable experimental features without having to specify the argument
NIX_CONFIG = "experimental-features = nix-command flakes";
buildInputs = [
python-with-my-packages
];
shellHook = ''
PYTHONPATH=${python-with-my-packages}/${python-with-my-packages.sitePackages}
'';
nativeBuildInputs = with pkgs; [
nix
home-manager
git
nil
nixpkgs-fmt
go-task
sops
pre-commit
gitleaks
mkdocs
2024-04-24 23:52:28 -05:00
mqttui
];
2024-03-17 16:04:32 -05:00
}