Files
Nixos/modules/home/common/env/rust.nix
T

28 lines
401 B
Nix

{
pkgs,
lib,
config,
...
}:
with lib;
let
cfg = config.home.env.rust;
in
{
options.home.env.rust = {
enable = mkEnableOption "Zen Editor options";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
rustup
];
home.sessionVariables = {
CARGO_HOME = "${config.xdg.dataHome}/cargo";
RUSTUP_HOME = "${config.xdg.dataHome}/rustup";
};
};
}