From b919a1592580af487eade8eb00b8e459810c52fd Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 22 Aug 2022 19:12:06 -0700 Subject: feat(rust): add an overlay to install rust Installing the rust overlay to get the various tools installed. This is done by a new module for home-manager, and is installed only on my laptop at the moment. Change-Id: I80c1633ca04da82f4321a0687a05d1df7c523702 --- home/rust/default.nix | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 home/rust/default.nix (limited to 'home/rust') diff --git a/home/rust/default.nix b/home/rust/default.nix new file mode 100644 index 0000000..2fe5053 --- /dev/null +++ b/home/rust/default.nix @@ -0,0 +1,17 @@ +{ lib, config, pkgs, ... }: +let cfg = config.my.home.rust; +in +{ + options.my.home.rust = with lib; { + enable = mkEnableOption "rust configuration"; + }; + + config = lib.mkIf cfg.enable { + home.packages = with pkgs; [ + rust-bin.beta.latest.default + rust-analyzer + ]; + home.sessionVariables.CARGO_HOME = "${config.xdg.dataHome}/cargo"; + home.sessionPath = [ "$CARGO_HOME/bin" ]; + }; +} -- cgit 1.4.1