diff --git a/hosts/_common/configuration.nix b/hosts/_common/configuration.nix index d78056e..99aadaf 100644 --- a/hosts/_common/configuration.nix +++ b/hosts/_common/configuration.nix @@ -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.'"; diff --git a/hosts/_common/shellInit.sh b/hosts/_common/shellInit.sh index 4868464..b5f1fb7 100644 --- a/hosts/_common/shellInit.sh +++ b/hosts/_common/shellInit.sh @@ -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 +} diff --git a/users/josh/nix_modules/rust-repl.nix b/users/josh/nix_modules/rust-repl.nix new file mode 100644 index 0000000..43dba3e --- /dev/null +++ b/users/josh/nix_modules/rust-repl.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: +{ + environment.systemPackages = [ pkgs.evcxr ]; + environment.shellAliases = { + rust = "evcxr"; + }; +}