Working on modularizing stuff

This commit is contained in:
Chris Kruining 2024-07-21 00:07:19 +02:00
parent 835faf218d
commit 8349809fec
15 changed files with 256 additions and 41 deletions

22
shell.nix Normal file
View file

@ -0,0 +1,22 @@
{ lib, pkgs ? import <nixpkgs> {} }:
let
inherit (lib.attrsets) attrValues;
inherit (lib.meta) getExe;
in
pkgs.mkShell {
buildInputs = attrValues {
inherit (pkgs) git nix-bash-completions;
};
shellHook = let
inherit (pkgs) nixStable writeShelScriptBin;
nixBin = writeShellScriptBin "nix" ''
${ getExe nixStable} --option experimental-features "nix-command flakes" "$@"
'';
in ''
export FLAKE="$(pwd)"
export PATH="$FLAKE/bin:${nixBin}/bin:$PATH"
'';
}