From f0642a0f56c37029507b7ae2f67a2ec4d7974f5c Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 13 Dec 2019 03:06:52 -0500 Subject: [PATCH] Add rust module --- config/rust/aliases.zsh | 5 +++++ config/rust/env.zsh | 5 +++++ configuration.kuro.nix | 1 + modules/dev/rust.nix | 13 +++++++++++++ 4 files changed, 24 insertions(+) create mode 100644 config/rust/aliases.zsh create mode 100644 config/rust/env.zsh 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 = ; + }; +}