made development into an option

added it to configuration
This commit is contained in:
2026-07-12 12:55:40 -05:00
parent 4f6c1e337d
commit ac862dfc1f
10 changed files with 200 additions and 87 deletions
+7
View File
@@ -130,6 +130,13 @@
lima.enable = true; lima.enable = true;
}; };
development = {
enable = true;
rust.enable = true;
typescript.enable = true;
go.enable = true;
};
}; };
programs.nix-ld.libraries = with pkgs; [ programs.nix-ld.libraries = with pkgs; [
+37
View File
@@ -0,0 +1,37 @@
{
inputs,
config,
lib,
pkgs,
...
}:
let
cfg = config.workstation.development;
in
{
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
gitFull
neovim
nixfmt
nixd
kubectl
jq
tmux
vscode
devenv
xh
nodejs
obsidian
];
# Nix LSP
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
fonts.packages = with pkgs; [
nerd-fonts.fira-code
nerd-fonts.jetbrains-mono
];
};
}
+16 -7
View File
@@ -1,9 +1,18 @@
{ pkgs, ... }:
{ {
environment.systemPackages = with pkgs; [ lib,
gcc config,
cmake pkgs,
clang ...
]; }:
let
cfg = config.workstation.development.clang;
in
{
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
gcc
cmake
clang
];
};
} }
+14 -5
View File
@@ -1,7 +1,16 @@
{ pkgs, ... }:
{ {
environment.systemPackages = with pkgs; [ config,
claude-code lib,
]; pkgs,
...
}:
let
cfg = config.workstation.development.claude;
in
{
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
claude-code
];
};
} }
+8 -23
View File
@@ -1,30 +1,15 @@
{ inputs, pkgs, ... }: { ... }:
{ {
imports = [ imports = [
./basic.nix
./rust.nix ./rust.nix
./clang.nix
./claude.nix
./go.nix
./options.nix
./python.nix
./typescript.nix
]; ];
environment.systemPackages = with pkgs; [
git
neovim
nixfmt
nixd
kubectl
jq
tmux
vscode
devenv
xh
nodejs
obsidian
];
# Nix LSP
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
fonts.packages = with pkgs; [
nerd-fonts.fira-code
nerd-fonts.jetbrains-mono
];
} }
+24 -15
View File
@@ -1,22 +1,31 @@
{ pkgs, ... }:
{ {
environment.systemPackages = with pkgs; [ config,
go lib,
pkgs,
...
}:
let
cfg = config.workstation.development.go;
in
{
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
go
# Language server # Language server
gopls gopls
# Formatter with automatic import management # Formatter with automatic import management
gotools gotools
# Linting # Linting
golangci-lint golangci-lint
# Debugger # Debugger
delve delve
# Useful extras # Useful extras
air # Live reload for web apps air # Live reload for web apps
]; ];
};
} }
+30
View File
@@ -0,0 +1,30 @@
{ lib, ... }:
{
options.workstation.development = {
enable = lib.mkEnableOption "the basic development toolkit";
clang = {
enable = lib.mkEnableOption "the clang toolkit";
};
claude = {
enable = lib.mkEnableOption "the AI harness";
};
go = {
enable = lib.mkEnableOption "the go toolkit";
};
python = {
enable = lib.mkEnableOption "the python toolkit";
};
rust = {
enable = lib.mkEnableOption "the rust toolkit";
};
typescript = {
enable = lib.mkEnableOption "the typescript toolkit";
};
};
}
+24 -15
View File
@@ -1,20 +1,29 @@
{ pkgs, ... }:
{ {
environment.systemPackages = with pkgs; [ config,
python313 lib,
pkgs,
...
}:
let
cfg = config.workstation.development.python;
in
{
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
python313
# package tooling # package tooling
python313Packages.uv python313Packages.uv
python313Packages.virtualenv python313Packages.virtualenv
# dev tools # dev tools
ruff ruff
black black
mypy mypy
# optional data science base tools # optional data science base tools
python313Packages.numpy python313Packages.numpy
python313Packages.pandas python313Packages.pandas
]; ];
};
} }
+19 -10
View File
@@ -1,14 +1,23 @@
{ pkgs, ... }:
{ {
environment.systemPackages = with pkgs; [ config,
cargo lib,
rustc pkgs,
rustfmt ...
clippy }:
]; let
cfg = config.workstation.development.rust;
in
{
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
cargo
rustc
rustfmt
clippy
];
environment.variables = { environment.variables = {
RUST_BACKTRACE = "1"; RUST_BACKTRACE = "1";
};
}; };
} }
+21 -12
View File
@@ -1,17 +1,26 @@
{ pkgs, ... }:
{ {
environment.systemPackages = with pkgs; [ config,
bun lib,
pkgs,
...
}:
let
cfg = config.workstation.development.typescript;
in
{
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
bun
prettier
eslint
typescript-language-server
# TS tooling (optional but common) # TS tooling (optional but common)
typescript typescript
nodePackages.typescript-language-server ];
nodePackages.eslint
nodePackages.prettier
];
environment.variables = { environment.variables = {
NODE_OPTIONS = "--max-old-space-size=4096"; NODE_OPTIONS = "--max-old-space-size=4096";
};
}; };
} }