made development into an option
added it to configuration
This commit is contained in:
@@ -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; [
|
||||
|
||||
@@ -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
|
||||
];
|
||||
|
||||
};
|
||||
}
|
||||
@@ -1,9 +1,18 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.workstation.development.clang;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
gcc
|
||||
cmake
|
||||
clang
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,7 +1,16 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.workstation.development.claude;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
claude-code
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.workstation.development.go;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
go
|
||||
|
||||
@@ -19,4 +27,5 @@
|
||||
# Useful extras
|
||||
air # Live reload for web apps
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,14 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.workstation.development.python;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
python313
|
||||
|
||||
@@ -17,4 +25,5 @@
|
||||
python313Packages.numpy
|
||||
python313Packages.pandas
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.workstation.development.rust;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
cargo
|
||||
rustc
|
||||
@@ -11,4 +19,5 @@
|
||||
environment.variables = {
|
||||
RUST_BACKTRACE = "1";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,17 +1,26 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
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
|
||||
];
|
||||
|
||||
environment.variables = {
|
||||
NODE_OPTIONS = "--max-old-space-size=4096";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user