aboutsummaryrefslogblamecommitdiff
path: root/home/rust/default.nix
blob: 2fe50536d456fe53a2f80a05a52fd827fc7a5bd0 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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" ];
  };
}