|
|
@@ -1,14 +1,127 @@
|
|
|
-# my home manager configuration
|
|
|
+# Nix Configuration
|
|
|
|
|
|
-Simply run this on any system that has `nix` and a user `thomas`:
|
|
|
+A comprehensive Nix configuration for managing multiple machines with a unified approach. This repository contains configurations for macOS (Darwin) and Linux systems, with shared home-manager configurations and custom packages.
|
|
|
+
|
|
|
+## Overview
|
|
|
+
|
|
|
+This repository manages the following machines:
|
|
|
+- **meili** - macOS laptop (aarch64-darwin)
|
|
|
+- **modgud** - Linux server (x86_64-linux)
|
|
|
+
|
|
|
+Each machine has its own system configuration and home-manager setup, with shared modules and features.
|
|
|
+
|
|
|
+## Project Structure
|
|
|
+
|
|
|
+```
|
|
|
+.
|
|
|
+├── flake.nix # Main flake configuration
|
|
|
+├── hosts/ # System-specific configurations
|
|
|
+│ ├── meili/ # macOS laptop configuration
|
|
|
+│ └── modgud/ # Linux server configuration
|
|
|
+├── home/ # My home-manager configurations
|
|
|
+│ └── features/ # Shared home-manager features
|
|
|
+│ ├── cli/ # CLI tools (git, fish, tmux, etc.)
|
|
|
+│ ├── desktop/ # Desktop applications (aerospace, ghostty, etc.)
|
|
|
+│ └── nvim/ # Neovim configuration
|
|
|
+├── modules/ # Shared NixOS/Darwin modules
|
|
|
+├── packages/ # Custom packages
|
|
|
+├── lib/ # Helper functions
|
|
|
+└── overlays/ # Nixpkgs overlays
|
|
|
+```
|
|
|
+
|
|
|
+## Quick Start
|
|
|
+
|
|
|
+### For macOS (meili)
|
|
|
```bash
|
|
|
-nix run github:nix-community/home-manager -- switch --flake .#thomas
|
|
|
+# Apply system configuration
|
|
|
+nix run github:lnl7/nix-darwin -- switch --flake .#meili
|
|
|
+
|
|
|
+# Apply home-manager configuration
|
|
|
+nix run github:nix-community/home-manager -- switch --flake .#thomas@meili
|
|
|
+```
|
|
|
+
|
|
|
+### For Linux (modgud)
|
|
|
+```bash
|
|
|
+# Apply system configuration (if NixOS)
|
|
|
+nix run github:nix-community/nixos-anywhere -- --flake .#modgud [email protected]
|
|
|
+
|
|
|
+# Apply home-manager configuration
|
|
|
+nix run github:nix-community/home-manager -- switch --flake .#thomas@modgud
|
|
|
```
|
|
|
|
|
|
-Notes:
|
|
|
-Rewatch this: https://www.youtube.com/watch?v=X-Lzq7jAT8I
|
|
|
+## Features
|
|
|
+
|
|
|
+### Shared CLI Tools
|
|
|
+- **Fish shell** - Interactive shell with completions
|
|
|
+- **Git** - Version control with custom configuration
|
|
|
+- **TMUX** - Terminal multiplexer with custom keybindings
|
|
|
+- **Starship** - Cross-shell prompt
|
|
|
+- **Bat** - Better cat with syntax highlighting
|
|
|
+- **SSH** - Secure shell configuration
|
|
|
+- **GnuPG** - Encryption and signing
|
|
|
+
|
|
|
+### Desktop Features (macOS only)
|
|
|
+- **AeroSpace** - i3-style tiling window manager
|
|
|
+- **Ghostty** - Modern terminal emulator
|
|
|
+- **Zen Browser** - Privacy-focused browser
|
|
|
+- **YubiKey** - Hardware security key support
|
|
|
+- **Fonts** - Custom font configuration
|
|
|
+
|
|
|
+### Development Tools
|
|
|
+- **Neovim** - Text editor with LSP, treesitter, and telescope
|
|
|
+- **Custom packages** - Including photo-cli for photo management
|
|
|
|
|
|
+## Custom Packages
|
|
|
|
|
|
+This repository includes several custom packages:
|
|
|
+
|
|
|
+- `photo-cli` - Photo management and organization tool
|
|
|
+- `tmux-select-pane-no-wrap` - TMUX pane selection without wrapping
|
|
|
+- `aerospace-tmux-focus` - Integration between AeroSpace and TMUX
|
|
|
+- `hello` - Example package
|
|
|
+
|
|
|
+## Machine-Specific Configurations
|
|
|
+
|
|
|
+### meili (macOS Laptop)
|
|
|
+- **System**: aarch64-darwin
|
|
|
+- **Features**: Full desktop environment with tiling window manager
|
|
|
+- **Location**: America/Los_Angeles timezone
|
|
|
+- **Services**: Remote login enabled
|
|
|
+
|
|
|
+### modgud (Linux Server)
|
|
|
+- **System**: x86_64-linux
|
|
|
+- **Features**: Server-focused configuration with minimal desktop components
|
|
|
+- **Location**: Europe/Amsterdam timezone
|
|
|
+- **Services**: Reverse proxy, identity provider, P2P mesh network
|
|
|
+
|
|
|
+## Development
|
|
|
+
|
|
|
+### Adding a New Machine
|
|
|
+
|
|
|
+1. Create a new directory in `hosts/` for your machine
|
|
|
+2. Add system configuration to `flake.nix`
|
|
|
+3. Create home-manager configuration in `home/`
|
|
|
+4. Add any machine-specific modules as needed
|
|
|
+
|
|
|
+### Adding New Features
|
|
|
+
|
|
|
+1. Create feature modules in `home/features/`
|
|
|
+2. Import them in the appropriate machine configurations
|
|
|
+3. Update documentation as needed
|
|
|
+
|
|
|
+## Notes
|
|
|
+
|
|
|
+- The configuration uses Nix flake inputs for reproducible builds
|
|
|
+- Home-manager configurations are shared between machines where appropriate
|
|
|
+- Custom packages are defined in the `packages/` directory
|
|
|
+- The `lib/` directory contains helper functions for creating configurations
|
|
|
+
|
|
|
+## Photo Management Commands
|
|
|
+
|
|
|
+For photo organization, use the custom `photo-cli` package:
|
|
|
+
|
|
|
+```bash
|
|
|
+# Copy photos with folder hierarchy preservation
|
|
|
photo-cli copy \
|
|
|
--process-type SubFoldersPreserveFolderHierarchy \
|
|
|
--naming-style DateTimeWithSecondsAddress \
|
|
|
@@ -22,6 +135,7 @@ photo-cli copy \
|
|
|
--verify \
|
|
|
--output ~/Photos
|
|
|
|
|
|
+# Flatten all subfolders with address-based grouping
|
|
|
photo-cli copy \
|
|
|
--process-type FlattenAllSubFolders \
|
|
|
--group-by AddressHierarchy \
|
|
|
@@ -34,3 +148,4 @@ photo-cli copy \
|
|
|
--input ~/Backup \
|
|
|
--output ~/Photos \
|
|
|
--dry-run --verify
|
|
|
+```
|