From 328c741b1aac74020412e99e0dca7c728dbc92fa Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Mon, 23 Jun 2025 22:33:44 -0400 Subject: refactor --- modules/development/default.nix | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 modules/development/default.nix (limited to 'modules/development/default.nix') diff --git a/modules/development/default.nix b/modules/development/default.nix new file mode 100644 index 0000000..486a220 --- /dev/null +++ b/modules/development/default.nix @@ -0,0 +1,49 @@ +{ + lib, + config, + pkgs, + ... +}: let + inherit (lib) mkEnableOption optionals; + cfg = config.development; +in { + options.development = { + c = mkEnableOption "Enable c/c++ development tools."; + java = mkEnableOption "Enable java/kotlin development tools."; + rust = mkEnableOption "Enable rust development tools."; + zig = mkEnableOption "Enable zig development tools."; + }; + + config = { + home-manager.users.${config.user} = { + home.packages = with pkgs; + (optionals cfg.c [ + clang-tools + gcc + gdb + gnumake + nasm + pkg-config + ]) + ++ (optionals cfg.rust [ + rustc + rustfmt + rust-analyzer + cargo + clippy + ]) + ++ (optionals cfg.java [ + gradle + jdk + jdt-language-server + kotlin + kotlin-language-server + maven + ]) + ++ (optionals cfg.zig [ + zig + zls + ]); + }; + }; +} -- cgit v1.2.3-freya