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 = {
|
||||
nrepl = ''
|
||||
nix repl --expr 'rec {pkgs=(import <nixpkgs> {}); lib=pkgs.lib;}'
|
||||
'';
|
||||
};
|
||||
home.packages = let
|
||||
nrepl =
|
||||
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