Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
233a37c
chore: add configs for new mac
sandangel Apr 9, 2025
54a90bc
add disks
sandangel Apr 9, 2025
3287b41
fix
sandangel Apr 9, 2025
bcdc7b6
fix sha
sandangel Apr 9, 2025
b50a70f
add neovide config
sandangel Apr 10, 2025
640e399
add aider
sandangel Apr 15, 2025
829bb67
update flakes
sandangel Apr 21, 2025
0fd2f9a
update ghostty
sandangel Apr 23, 2025
5d2d8a5
update changes
sandangel May 7, 2025
a1a5834
update install instruction
sandangel May 8, 2025
1be7d33
fix user name
sandangel May 8, 2025
d985433
chore update lockfile
sandangel May 8, 2025
e0bec9f
fix deprecated
sandangel May 8, 2025
5a2840b
fix bash
sandangel May 8, 2025
65ddae8
chore: switch to alacritty instead of ghostty
sandangel May 18, 2025
d6d56d1
fix alacritty keymap
sandangel May 22, 2025
c733e28
chore: upgrade nixos with claude
sandangel Jun 2, 2025
8525105
reset mnt path
sandangel Jun 2, 2025
554d5c6
chore: update nixos and AI code editor
sandangel Jun 20, 2025
a657f97
upgrade version
sandangel Jul 10, 2025
beb1995
chore: add vscode
sandangel Aug 2, 2025
bfe09a9
update mappings for ctrl+v
sandangel Aug 23, 2025
9f4eed7
chore: add ghostty back
sandangel Aug 24, 2025
dc41a65
chore: add deps
sandangel Sep 1, 2025
930698f
update
sandangel Sep 13, 2025
9f90b13
update service
sandangel Sep 13, 2025
3b83630
feat: add prlcc service and update claudecode config
sandangel Sep 14, 2025
5bc66c1
start using niri
sandangel Sep 20, 2025
185aa4c
chore: update niri version
sandangel Sep 21, 2025
eaf6a0d
fix neovide launch crashes when nvim is not ready
sandangel Sep 22, 2025
75c6dba
chore: update dank shell and lsp config
sandangel Sep 28, 2025
538b361
chore: upgrade nixos and do not use devenv
sandangel Oct 16, 2025
93ffe73
chore: upgrade nixos
sandangel Oct 30, 2025
9dc251c
chore: disable screen reader and upgrade
sandangel Nov 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,17 @@
result
.direnv
.devenv
.aider*
.aider.chat.history.md
.aider.input.history
.aider.tags.cache.v3

# Devenv
.devenv*
devenv.local.nix
devenv.local.yaml

# direnv
.direnv

# pre-commit
.pre-commit-config.yaml
61 changes: 61 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Repository Overview

This is a personal Nix configuration repository for development environments using NixOS and home-manager. It supports both Linux (primarily in VMs) and macOS systems with a focus on VM-based development workflows.

## Common Commands

### System Management
- `make switch` - Rebuild and switch to the new configuration (main command for applying changes)
- `sudo nixos-rebuild switch --flake .#` - Alternative to make switch on NixOS
- `home-manager switch --flake .#sand` - Apply home-manager changes for Linux user
- `home-manager switch --flake .#san.nguyen` - Apply home-manager changes for macOS user

### Flake Management
- `nix flake update` - Update all flake inputs
- `nix flake lock --update-input <input>` - Update specific input

## Architecture

### Directory Structure
- `modules/` - Home-manager modules for individual programs/tools
- `pkgs/` - Custom package definitions (e.g., nvchad configuration)
- `machines/` - Machine-specific NixOS configurations
- `users/` - User-specific home-manager configurations
- `overlays/` - Nix overlays for package modifications

### Key Configuration Patterns
1. **Modular Design**: Each tool/program has its own module in `modules/` that can be enabled/disabled
2. **User Separation**: Configurations are split between `sand` (Linux) and `san.nguyen` (macOS)
3. **VM Platform Support**: Specific configurations for VMware Fusion and Parallels Desktop
4. **Flake-based**: All dependencies are pinned through flake.lock for reproducibility

### Important Files
- `flake.nix` - Main entry point defining inputs and outputs
- `configuration.nix` - Base NixOS system configuration
- `home.nix` - Base home-manager configuration
- `machines/parallels-desktop.nix` and `machines/vmware-fusion.nix` - VM-specific configs

### Module System
Modules typically follow this pattern:
```nix
{ config, lib, pkgs, ... }: {
programs.toolname = {
enable = true;
# tool-specific configuration
};
# or
home.file.".config/toolname" = {
source = ./config;
};
}
```

### Git Configuration
The repository uses conditional git includes for work directories:
- Work repos assumed to be in `~/Work/`
- Personal repos elsewhere
- Separate git identities for work/personal commits
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ NIXNAME ?= vm-aarch64
SSH_OPTIONS=-o PubkeyAuthentication=no -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no

switch:
nixos-rebuild switch --use-remote-sudo --impure --flake ".#parallels-desktop"
rsync -av $(MAKEFILE_DIR)/modules/karabiner/mbp_m1_woven_planet/* /media/psf/Home/.config/karabiner
nixos-rebuild switch --sudo --impure --flake ".#parallels-desktop"
# nix store gc
# nix store optimise
# nixos-rebuild switch --use-remote-sudo --impure --flake ".#vmware-fusion"
# /home/$(NIXUSER)/.nix-profile/bin/home-manager switch --impure --flake ".#$(NIXUSER)" -b backup
# rsync -av $(MAKEFILE_DIR)/users/$(NIXUSER)/karabiner/mbp_m1_woven_planet/* /media/psf/Home/.config/karabiner

# bootstrap a brand new VM. The VM should have NixOS ISO on the CD drive
# and just set the password of the root user to "root". This will install
Expand Down
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,28 @@ sudo vim /etc/rpm-ostreed.conf
# AutomaticUpdatePolicy=stage
```

## Setup NixOS

Boot from NixOS iso image, then run

```sh
nix --extra-experimental-features 'nix-command flakes' shell nixpkgs#gh
gh auth login
gh clone sandangel/nixos-config ~/.nix-config
cd ~/.nix-config
gh clone sandangel/artifacts

cp artifacts/comic-code.tar.gz pkgs/comic-code/
vim pkgs/comic-code/default.nix # change /home/sand to /home/nixos

# Format disk
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount ./machines/parallels/disko-config.nix

# Install NixOS
cd /mnt
sudo nixos-install --flake '/home/nixos/.nix-config#parallels-desktop' --impure
```

## Setup Arch Linux

```sh
Expand Down Expand Up @@ -324,4 +346,9 @@ mount /dev/nvme0n2p1 /mnt

btrfs filesystem resize max /mnt
```

To sync data from VM and Host

```sh
rsync -ahr --no-links --exclude=".Trash-1000" --exclude=".pnpm-store" --exclude=".devenv" --exclude="node_modules" --exclude=".venv" --exclude=".cache" --exclude=".pdm-build" --exclude=".mypy_cache" --exclude=".ruff_cache" --exclude="dist" --exclude=".pytest_cache" --exclude="target" --exclude=".terraform" ~/Work /host/Downloads/
```
Loading