diff --git a/config/rust/aliases.zsh b/config/rust/aliases.zsh new file mode 100644 index 00000000..8fd46945 --- /dev/null +++ b/config/rust/aliases.zsh @@ -0,0 +1,5 @@ +#!/usr/bin/env zsh + +alias rs=rustc +alias rsp=rustup +alias ca=cargo diff --git a/config/rust/env.zsh b/config/rust/env.zsh new file mode 100644 index 00000000..6b9e6bcc --- /dev/null +++ b/config/rust/env.zsh @@ -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" diff --git a/configuration.kuro.nix b/configuration.kuro.nix index 8b9b7db0..f91b3b9d 100644 --- a/configuration.kuro.nix +++ b/configuration.kuro.nix @@ -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 diff --git a/modules/dev/rust.nix b/modules/dev/rust.nix index e69de29b..794c0643 100644 --- a/modules/dev/rust.nix +++ b/modules/dev/rust.nix @@ -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 = ; + "zsh/rc.d/env.rust.zsh".source = ; + }; +}