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;
};
development = {
enable = true;
rust.enable = true;
typescript.enable = true;
go.enable = true;
};
};
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; [
gcc
cmake
clang
];
lib,
config,
pkgs,
...
}:
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; [
claude-code
];
config,
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 = [
./basic.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; [
go
config,
lib,
pkgs,
...
}:
let
cfg = config.workstation.development.go;
in
{
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
go
# Language server
gopls
# Language server
gopls
# Formatter with automatic import management
gotools
# Formatter with automatic import management
gotools
# Linting
golangci-lint
# Linting
golangci-lint
# Debugger
delve
# Debugger
delve
# Useful extras
air # Live reload for web apps
];
# Useful extras
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; [
python313
config,
lib,
pkgs,
...
}:
let
cfg = config.workstation.development.python;
in
{
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
python313
# package tooling
python313Packages.uv
python313Packages.virtualenv
# package tooling
python313Packages.uv
python313Packages.virtualenv
# dev tools
ruff
black
mypy
# dev tools
ruff
black
mypy
# optional data science base tools
python313Packages.numpy
python313Packages.pandas
];
# optional data science base tools
python313Packages.numpy
python313Packages.pandas
];
};
}
+19 -10
View File
@@ -1,14 +1,23 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
cargo
rustc
rustfmt
clippy
];
config,
lib,
pkgs,
...
}:
let
cfg = config.workstation.development.rust;
in
{
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
cargo
rustc
rustfmt
clippy
];
environment.variables = {
RUST_BACKTRACE = "1";
environment.variables = {
RUST_BACKTRACE = "1";
};
};
}
+21 -12
View File
@@ -1,17 +1,26 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
bun
config,
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)
typescript
nodePackages.typescript-language-server
nodePackages.eslint
nodePackages.prettier
];
# TS tooling (optional but common)
typescript
];
environment.variables = {
NODE_OPTIONS = "--max-old-space-size=4096";
environment.variables = {
NODE_OPTIONS = "--max-old-space-size=4096";
};
};
}