Add rust module

This commit is contained in:
Henrik Lissner 2019-12-13 03:06:52 -05:00
parent d81e6d4063
commit f0642a0f56
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
4 changed files with 24 additions and 0 deletions

5
config/rust/aliases.zsh Normal file
View file

@ -0,0 +1,5 @@
#!/usr/bin/env zsh
alias rs=rustc
alias rsp=rustup
alias ca=cargo

5
config/rust/env.zsh Normal file
View file

@ -0,0 +1,5 @@
#!/usr/bin/env zsh
export CARGO_HOME="$XDG_DATA_HOME/cargo"
export RUSTUP_HOME="$XDG_DATA_HOME/rustup"
export PATH="$CARGO_HOME/bin:$PATH"

View file

@ -13,6 +13,7 @@
./modules/audio/spotify.nix
./modules/browser/firefox.nix
./modules/dev
./modules/dev/rust.nix
./modules/editors/emacs.nix
./modules/editors/vim.nix
./modules/gaming/steam.nix

View file

@ -0,0 +1,13 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
rustup
rls
];
home-manager.users.hlissner.xdg.configFile = {
"zsh/rc.d/aliases.rust.zsh".source = <config/rust/aliases.zsh>;
"zsh/rc.d/env.rust.zsh".source = <config/rust/env.zsh>;
};
}