mirror of
https://git.oat.zone/dark-firepit/dotfiles
synced 2024-11-29 16:53:45 +01:00
23 lines
412 B
Nix
23 lines
412 B
Nix
{ pkgs, lib, config, options, ... }:
|
|
|
|
with lib;
|
|
let
|
|
cfg = config.modules.dev.rust;
|
|
in {
|
|
options.modules.dev.rust = {
|
|
enable = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
};
|
|
};
|
|
|
|
config = mkIf cfg.enable {
|
|
user.packages = with pkgs; [
|
|
cargo
|
|
rustc
|
|
];
|
|
|
|
environment.sessionVariables.RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
|
|
};
|
|
}
|