nixos-config/modules/dev/rust.nix

26 lines
513 B
Nix
Raw Normal View History

2020-08-06 15:35:49 +00:00
# Ah yes, Rust...
# The programming language that made me appreciate/tolerate C++ even more.
{ config, options, lib, pkgs, ... }:
with lib;
{
options.modules.dev.rust = {
enable = mkOption {
type = types.bool;
default = false;
};
};
config = mkIf config.modules.dev.rust.enable {
2020-08-16 08:33:44 +00:00
my.packages = with pkgs; [
2020-08-06 15:35:49 +00:00
rustup
];
2020-08-16 08:33:44 +00:00
my.env = {
CARGO_HOME = "$XDG_DATA_HOME/cargo";
RUSTUP_HOME = "$XDG_DATA_HOME/rustup";
2020-08-06 15:35:49 +00:00
PATH = [ "$CARGO_HOME/bin" ];
};
};
}