{ config, lib, pkgs, ... }: # Rust tools for the primary user's shell environment. let cfg = config.modules.shell.rust; user = config.user.name; in { options.modules.shell.rust.enable = lib.mkEnableOption "Rust tools for the primary user's shell environment"; config = lib.mkIf cfg.enable { home-manager.users.${user}.home.packages = with pkgs; [ cargo clippy gcc rust-analyzer rustc rustfmt ]; }; }