Compare commits

...

3 commits

Author SHA1 Message Date
2a63eb381c
add Claude Code integration
- Add CLAUDE.md with comprehensive repository documentation
- Configure claude-code package in editors feature
- Add MCP nixos integration for better Nix ecosystem support
- Include Claude settings with co-authored-by disabled
- Update unfree predicate for proprietary AI tools
2025-09-29 09:13:00 +08:00
d25c4ad382
update flake inputs
- flake-parts: update for better module composition
- nixvim config: latest updates from upstream
- nixpkgs: fresh package versions
- ixx: bump to v0.1.1 for improved functionality
2025-09-29 09:11:56 +08:00
9c07f33ff8
we no longer use aider but lets keep this 2025-09-28 12:05:55 +08:00
5 changed files with 133 additions and 38 deletions

67
CLAUDE.md Normal file
View file

@ -0,0 +1,67 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Repository Overview
This is a NixOS and Home Manager configuration using flakes architecture, managing two hosts (`fuchsia` and `viridian`) with declarative system and user configurations.
## Common Development Commands
### System Management
- `just build <hostname>` - Build system configuration without switching
- `just switch <hostname>` - Build and switch to new system configuration (requires sudo)
- `just deploy <hostname>` - Deploy configuration to remote host
### Nix Operations
- `nix build` - Build packages defined in flake
- `nix fmt` - Format Nix files using alejandra formatter
- `nix flake update` - Update all flake inputs
- `nixos-rebuild build --flake .#<hostname>` - Build specific host configuration
- `home-manager switch --flake .#sajenim@<hostname>` - Switch Home Manager configuration
### Development Environment
- `nix develop` - Enter development shell with `just` available
- `nix-shell` - Legacy shell environment
## Architecture
### Flake Structure
- **Main flake inputs**: nixpkgs (stable/unstable), home-manager, agenix/agenix-rekey, external configs
- **Outputs**: NixOS configurations, Home Manager configurations, packages, overlays, modules
- **Host configurations**: `fuchsia` (desktop) and `viridian` (server)
### Directory Organization
- `nixos/` - System-level configurations
- `common/global/` - Shared system configuration (nix settings, secrets, SSH)
- `common/users/` - User account definitions
- `common/optional/` - Optional system features (yubikey, persistence)
- `<hostname>/` - Host-specific configurations and services
- `home-manager/` - User environment configurations
- `sajenim/features/` - Modular user features (cli, desktop, editors, games)
- `sajenim/global/` - Base user configuration
- `modules/` - Custom NixOS and Home Manager modules
- `pkgs/` - Custom package definitions
- `overlays/` - Package modifications and patches
### Key Features
- **Ephemeral BTRFS**: Root filesystem is recreated on boot with opt-in persistence
- **Secret Management**: agenix for encrypted secrets, rekeyed with YubiKey
- **Modular Design**: Features organized as importable modules
- **Custom Packages**: External configurations (nixvim, xmonad-config) as flake inputs
### Host Profiles
- **fuchsia**: Desktop workstation with X11, gaming, development tools
- **viridian**: Server with multimedia stack (*arr services), web services, containers
### Service Management
- Services defined in `nixos/<hostname>/services/` and `nixos/<hostname>/multimedia/`
- Docker containers managed through `virtualisation.oci-containers`
- Traefik reverse proxy with automatic HTTPS
- Borgbackup for persistent data
### Configuration Patterns
- All `.nix` files use `default.nix` for module entry points
- Configurations use explicit imports for modular composition
- Host-specific and shared configurations clearly separated
- External dependencies managed through flake inputs

82
flake.lock generated
View file

@ -165,11 +165,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1743550720,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"lastModified": 1756770412,
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
"rev": "4524271976b625a4a605beefd893f270620fd751",
"type": "github"
},
"original": {
@ -187,11 +187,11 @@
]
},
"locked": {
"lastModified": 1743550720,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"lastModified": 1756770412,
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
"rev": "4524271976b625a4a605beefd893f270620fd751",
"type": "github"
},
"original": {
@ -297,7 +297,7 @@
},
"flake-utils_5": {
"inputs": {
"systems": "systems_6"
"systems": "systems_7"
},
"locked": {
"lastModified": 1731533236,
@ -315,7 +315,7 @@
},
"flake-utils_6": {
"inputs": {
"systems": "systems_7"
"systems": "systems_8"
},
"locked": {
"lastModified": 1726560853,
@ -472,16 +472,16 @@
]
},
"locked": {
"lastModified": 1729958008,
"narHash": "sha256-EiOq8jF4Z/zQe0QYVc3+qSKxRK//CFHMB84aYrYGwEs=",
"lastModified": 1754860581,
"narHash": "sha256-EM0IE63OHxXCOpDHXaTyHIOk2cNvMCGPqLt/IdtVxgk=",
"owner": "NuschtOS",
"repo": "ixx",
"rev": "9fd01aad037f345350eab2cd45e1946cc66da4eb",
"rev": "babfe85a876162c4acc9ab6fb4483df88fa1f281",
"type": "github"
},
"original": {
"owner": "NuschtOS",
"ref": "v0.0.6",
"ref": "v0.1.1",
"repo": "ixx",
"type": "github"
}
@ -581,11 +581,11 @@
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1743296961,
"narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=",
"lastModified": 1754788789,
"narHash": "sha256-x2rJ+Ovzq0sCMpgfgGaaqgBSwY+LST+WbZ6TytnT9Rk=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa",
"rev": "a73b9c743612e4244d865a2fdee11865283c04e6",
"type": "github"
},
"original": {
@ -691,11 +691,11 @@
},
"nixpkgs_6": {
"locked": {
"lastModified": 1744098102,
"narHash": "sha256-tzCdyIJj9AjysC3OuKA+tMD/kDEDAF9mICPDU7ix0JA=",
"lastModified": 1758690382,
"narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c8cd81426f45942bb2906d5ed2fe21d2f19d95b7",
"rev": "e643668fd71b949c53f8626614b21ff71a07379d",
"type": "github"
},
"original": {
@ -707,11 +707,11 @@
},
"nixpkgs_7": {
"locked": {
"lastModified": 1744157173,
"narHash": "sha256-bWSjxDwq7iVePrhmA7tY2dyMWHuNJo8knkO4y+q4ZkY=",
"lastModified": 1758763312,
"narHash": "sha256-puBMviZhYlqOdUUgEmMVJpXqC/ToEqSvkyZ30qQ09xM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6a39c6e495eefabc935d8ddf66aa45d85b85fa3f",
"rev": "e57b3b16ad8758fd681511a078f35c416a8cc939",
"type": "github"
},
"original": {
@ -760,11 +760,11 @@
"nixvim": "nixvim_2"
},
"locked": {
"lastModified": 1758770467,
"narHash": "sha256-VceMbbBOCUQfCgBM1TtHIrDSgeI9fakG6T6KZb7p0PY=",
"lastModified": 1758995705,
"narHash": "sha256-ix/VUpm2MIAr16yMmUeB/B8tdv7ximran6zZa1OlZvg=",
"ref": "refs/heads/master",
"rev": "48b93a848e5132c007cfbd0075f264a7719d75a8",
"revCount": 101,
"rev": "939e8a45f5f9c3ab32f071a559bca6eceead0d53",
"revCount": 104,
"type": "git",
"url": "https://git.sajenim.dev/jasmine/nixvim-config.git"
},
@ -777,14 +777,15 @@
"inputs": {
"flake-parts": "flake-parts_3",
"nixpkgs": "nixpkgs_7",
"nuschtosSearch": "nuschtosSearch"
"nuschtosSearch": "nuschtosSearch",
"systems": "systems_6"
},
"locked": {
"lastModified": 1744272522,
"narHash": "sha256-cFuxYOLp/6L0eu5wX7xmaF4VhqEm/aT08awzEHGMMQE=",
"lastModified": 1758931855,
"narHash": "sha256-jTmbWlOxsy9dDP3UdCB6jEO63FtkM3dQG2FOq0b4foI=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "33c3f98fdc9a62183ec7d535bf910e04f141284b",
"rev": "e0f1e4ae4bb8762b7c51c3a514ca19664fad9c3b",
"type": "github"
},
"original": {
@ -804,11 +805,11 @@
]
},
"locked": {
"lastModified": 1743683223,
"narHash": "sha256-LdXtHFvhEC3S64dphap1pkkzwjErbW65eH1VRerCUT0=",
"lastModified": 1758662783,
"narHash": "sha256-igrxT+/MnmcftPOHEb+XDwAMq3Xg1Xy7kVYQaHhPlAg=",
"owner": "NuschtOS",
"repo": "search",
"rev": "56a49ffef2908dad1e9a8adef1f18802bc760962",
"rev": "7d4c0fc4ffe3bd64e5630417162e9e04e64b27a4",
"type": "github"
},
"original": {
@ -822,7 +823,7 @@
"flake-utils": "flake-utils_6",
"nix-github-actions": "nix-github-actions",
"nixpkgs": "nixpkgs_9",
"systems": "systems_8",
"systems": "systems_9",
"treefmt-nix": "treefmt-nix_2"
},
"locked": {
@ -1018,6 +1019,21 @@
"type": "github"
}
},
"systems_9": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"treefmt-nix": {
"inputs": {
"nixpkgs": [

View file

@ -0,0 +1,4 @@
{
"outputStyle": "Explanatory",
"includeCoAuthoredBy": false
}

View file

@ -14,6 +14,10 @@
# Typesetting
pandoc
texliveFull
# AI-powered coding assistant and CLI tool
claude-code
unstable.mcp-nixos
]
++ [
# Our personal neovim configuration.
@ -27,13 +31,17 @@
])
]); # https://github.com/theCapypara/nix-jetbrains-plugins
# Allow unfree packages for jetbrains IDEs
# Allow unfree packages for proprietary software
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"claude-code"
"idea-ultimate"
"idea-ultimate-with-plugins"
];
# Copy our vim configuration file for jetbrains IDEs
home.file.".ideavimrc".source = ./ideavimrc;
# Copy our configuration files to home directory
home.file = {
".ideavimrc".source = ./ideavimrc;
".claude/settings.json".source = ./claude-settings.json;
};
}

View file

@ -26,7 +26,7 @@
# Location to store models
models = "/srv/ollama/models";
# Increase context window for aider
# Increase context window
environmentVariables = {
OLLAMA_CONTEXT_LENGTH = "8192";
};