{ config, lib, pkgs, pkgs-unstable, ... }: { options.custom.development = { enable = lib.mkEnableOption "Development tools"; languages = lib.mkOption { type = lib.types.listOf lib.types.str; default = [ ]; description = "Programming languages to install (rust, python, nodejs, go, etc)"; }; }; config = let cfg = config.custom.development; languagePackages = { rust = with pkgs; [ rustup cargo-deny cargo-edit ]; python = with pkgs; [ python3 python3Packages.pip python3Packages.virtualenv uv ]; nodejs = with pkgs; [ nodejs pnpm ]; go = with pkgs; [ go golangci-lint ]; ruby = with pkgs; [ ruby bundler ]; }; selectedPackages = lib.concatMap (lang: languagePackages.${lang} or []) cfg.languages; in lib.mkIf cfg.enable { # Core development tools environment.systemPackages = with pkgs; [ git git-lfs gnumake pkg-config gcc clang cmake ripgrep jq ] ++ selectedPackages; # Enable container support (optional) #virtualisation.docker.enable = true; #virtualisation.docker.enableOnBoot = false; }; }