Files
nix-los/nixos/modules/development.nix

47 lines
1.1 KiB
Nix
Raw Permalink Normal View History

2026-04-07 02:34:03 +02:00
{ 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 ];
2026-04-07 02:34:03 +02:00
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;
2026-04-07 02:34:03 +02:00
};
}