mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-31 10:58:02 +00:00
26 lines
513 B
Nix
Executable File
26 lines
513 B
Nix
Executable File
# 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 {
|
|
my.packages = with pkgs; [
|
|
rustup
|
|
];
|
|
|
|
my.env = {
|
|
CARGO_HOME = "$XDG_DATA_HOME/cargo";
|
|
RUSTUP_HOME = "$XDG_DATA_HOME/rustup";
|
|
PATH = [ "$CARGO_HOME/bin" ];
|
|
};
|
|
};
|
|
}
|