rust repl
This commit is contained in:
parent
7477a7bd93
commit
049344ba97
3 changed files with 22 additions and 1 deletions
|
@ -107,7 +107,7 @@ in
|
|||
rgf = "rg --files 2>/dev/null | rg";
|
||||
|
||||
# Neofetch is dead
|
||||
neo = "fastfetch";
|
||||
neofetch = "fastfetch";
|
||||
|
||||
# Nix deprecations
|
||||
nix-hash = "echo 'The functionality of nix-hash may be covered by various subcommands or options in the new `nix` command.'";
|
||||
|
|
|
@ -108,3 +108,17 @@ checkout () {
|
|||
from_master () {
|
||||
git checkout $(getdefault) $@
|
||||
}
|
||||
|
||||
|
||||
# nix
|
||||
nixpkg () {
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Error: No arguments provided. Please specify at least one package."
|
||||
return 1
|
||||
fi
|
||||
cmd="nix shell"
|
||||
for pkg in "$@"; do
|
||||
cmd="$cmd \"nixpkgs#$pkg\""
|
||||
done
|
||||
eval $cmd
|
||||
}
|
||||
|
|
7
users/josh/nix_modules/rust-repl.nix
Normal file
7
users/josh/nix_modules/rust-repl.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [ pkgs.evcxr ];
|
||||
environment.shellAliases = {
|
||||
rust = "evcxr";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue