feat: nix repl
This commit is contained in:
parent
83de2f8264
commit
da60df353f
2 changed files with 19 additions and 5 deletions
|
@ -63,10 +63,15 @@
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
home.shellAbbrs = {
|
home.packages = let
|
||||||
nrepl = ''
|
nrepl =
|
||||||
nix repl --expr 'rec {pkgs=(import <nixpkgs> {}); lib=pkgs.lib;}'
|
pkgs.writeShellScriptBin "nrepl"
|
||||||
'';
|
# sh
|
||||||
};
|
''
|
||||||
|
nix repl "${toString ./.}/repl.nix" "$@"
|
||||||
|
'';
|
||||||
|
in [
|
||||||
|
nrepl
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
9
repl.nix
Normal file
9
repl.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
let
|
||||||
|
flake = builtins.getFlake (toString ./.);
|
||||||
|
nixpkgs = import <nixpkgs> {};
|
||||||
|
in
|
||||||
|
{inherit flake;}
|
||||||
|
// flake
|
||||||
|
// builtins
|
||||||
|
// nixpkgs
|
||||||
|
// nixpkgs.lib
|
Loading…
Reference in a new issue