dotfiles/modules/dev/rust.nix

23 lines
412 B
Nix
Raw Normal View History

2022-04-20 10:53:28 +02:00
{ 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}";
};
}