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
];
};
}
+11 -2
View File
@@ -1,9 +1,18 @@
{ pkgs, ... }:
{ {
lib,
config,
pkgs,
...
}:
let
cfg = config.workstation.development.clang;
in
{
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
gcc gcc
cmake cmake
clang clang
]; ];
};
} }
+11 -2
View File
@@ -1,7 +1,16 @@
{ pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}:
let
cfg = config.workstation.development.claude;
in
{
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
claude-code 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
];
} }
+11 -2
View File
@@ -1,6 +1,14 @@
{ pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}:
let
cfg = config.workstation.development.go;
in
{
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
go go
@@ -19,4 +27,5 @@
# 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";
};
};
}
+11 -2
View File
@@ -1,6 +1,14 @@
{ pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}:
let
cfg = config.workstation.development.python;
in
{
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
python313 python313
@@ -17,4 +25,5 @@
python313Packages.numpy python313Packages.numpy
python313Packages.pandas python313Packages.pandas
]; ];
};
} }
+11 -2
View File
@@ -1,6 +1,14 @@
{ pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}:
let
cfg = config.workstation.development.rust;
in
{
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
cargo cargo
rustc rustc
@@ -11,4 +19,5 @@
environment.variables = { environment.variables = {
RUST_BACKTRACE = "1"; RUST_BACKTRACE = "1";
}; };
};
} }
+14 -5
View File
@@ -1,17 +1,26 @@
{ pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}:
let
cfg = config.workstation.development.typescript;
in
{
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
bun 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";
}; };
};
} }