Files
NixOS/modules/dev/rust/home.nix
Danilo Reyes 66483c89ac
All checks were successful
MCP Tests / mcp-tests (push) Successful in 19s
code rules
2026-03-23 15:49:51 -06:00

38 lines
657 B
Nix

{
config,
inputs,
lib,
osConfig ? null,
pkgs,
...
}:
let
hm = inputs.self.lib.hmModule {
inherit
config
inputs
osConfig
;
optionPath = [
"dev"
"rust"
];
};
cfg = config.my.dev.rust;
feature = import ./common.nix { inherit pkgs; };
in
{
options.my.dev.rust.enable = lib.mkEnableOption "Install Rust tooling globally";
config = lib.mkMerge [
{
my.dev.rust.enable = lib.mkDefault hm.enabledByDefault;
}
(lib.mkIf cfg.enable {
home = {
inherit (feature) packages;
sessionVariables.CARGO_HOME = "${config.xdg.dataHome}/cargo";
};
})
];
}