update instruction and plan added notes.md

This commit is contained in:
Geir Okkenhaug Jerstad 2025-06-05 09:02:55 +02:00
parent acaa8234c2
commit f733f1059d
3 changed files with 77 additions and 25 deletions

0
Notes.md Normal file
View file

View file

@ -3,14 +3,38 @@
## Overview
This document provides step-by-step instructions for AI agents to help migrate the CongenitalOptimist machine from traditional NixOS configuration to flakes-based configuration and upgrade to NixOS 25.05. The system already has excellent modular structure that we'll preserve and enhance.
## General instructions
This document is to be treated as an iterative work and a collaberation.
## Goal for this file
Top part reusable instructions that can be transferred to other project and as away to iterativey make ai agent behave more like I prefer.
Bottom part should have information specific to the project.
The Plan.md file should have the project information and steps.
## Programming Languages and styles
- Prefer functional style
- Guille scheme for
- Python for ai and when guile
- Bash only for short scripts
- Typescript and javascript for web
- Rust for binary tools etc
## Written language and style
use Notes.md to take notes .
Use a casual but knowledgeable tone. This is not a corporate project there are no audits or compliance to adhere to.
More like an open source project, more like a hobby/passion project
# Bottom part
itreative about the project update often
## Current System Information
- **Hostname**: work (consider renaming to congenital-optimist)
- **Current Version**: NixOS 23.11
- **Target Version**: NixOS 25.05
- **Hostname**: work → congenital-optimist (migration in progress)
- **Current Version**: NixOS 25.05 (migrated from 23.11)
- **Target Version**: NixOS 25.05
- **Architecture**: x86_64-linux
- **Storage**: ZFS (zpool for system, stuffpool for data)
- **Hardware**: AMD CPU/GPU
- **User**: geir
- **Users**: geir (primary), sma (admin)
- **Dotfiles Approach**: Literate programming with Emacs org-mode (no Home Manager)
## Current Module Structure
@ -21,17 +45,29 @@ Home-lab/
│ │ ├── configuration.nix (main system config)
│ │ ├── hardware-configuration.nix
│ │ └── About.org
│ └── modules/
│ ├── sleeper-service/
│ ├── reverse-proxy/
│ └── grey-area/
├── modules/
│ ├── common/
│ │ ├── base.nix (modern CLI tools & aliases)
│ │ └── tty.nix (console styling with Joker theme)
│ │ ├── tty.nix (console styling with Joker theme)
│ │ └── nix.nix (flakes configuration)
│ ├── desktop/
│ │ ├── common.nix, gnome.nix, cosmic.nix, sway.nix
│ ├── development/
│ │ └── tools.nix (editors, LSPs, languages)
│ ├── hardware/
│ │ └── amd-workstation.nix
│ ├── system/
│ │ ├── applications.nix, fonts.nix, network.nix
│ ├── users/
│ │ ├── common.nix, geir.nix, sma.nix
│ └── virtualization/
│ ├── podman.nix
│ ├── libvirt.nix
│ └── incus.nix
└── Users/
│ ├── podman.nix, libvirt.nix, incus.nix
└── users/
└── geir/
└── user.nix (has typo: progtams → programs)
└── dotfiles/ (literate org-mode configs)
```
## Prerequisites Check
@ -40,7 +76,7 @@ Before starting, verify:
2. ZFS pools are healthy (`zpool status`)
3. All referenced modules exist and are working
4. User has sudo/root access
5. Fix typo in `Users/geir/user.nix` first
5. Git repository is initialized and up to date
## Step 1: Fix Existing Configuration Issues

36
plan.md
View file

@ -1,6 +1,7 @@
# Home Lab Migration Plan
## Current ├── machines/
## Current
├── machines/
│ ├── congenital-optimist/ (AMD workstation)
│ │ ├── default.nix
│ │ ├── hardware-configuration.nix
@ -184,12 +185,20 @@ Home-lab/
├── flake.nix
├── flake.lock
├── machines/
│ ├── CongenitalOptimist/ (AMD workstation)
│ ├── congenital-optimist/ (AMD workstation)
│ │ ├── default.nix (main machine config)
│ │ ├── hardware-configuration.nix
│ │ └── About.org
│ └── SleeperService/ (Intel Xeon file server)
│ ├── default.nix (file server config)
│ ├── sleeper-service/ (Intel Xeon file server)
│ │ ├── default.nix (file server config)
│ │ ├── hardware-configuration.nix
│ │ └── About.org
│ ├── reverse-proxy/ (edge/gateway server)
│ │ ├── default.nix
│ │ ├── hardware-configuration.nix
│ │ └── About.org
│ └── grey-area/ (application server)
│ ├── default.nix
│ ├── hardware-configuration.nix
│ └── About.org
├── modules/
@ -288,27 +297,27 @@ Home-lab/
### 5.1 Infrastructure Additions
#### Naming Convention
- **Machine Names**: UpperCase (e.g., `CongenitalOptimist`, `SleeperService`)
- **Folder Names**: UpperCase matching machine names (e.g., `CongenitalOptimist/`, `SleeperService/`)
- **Machine Names**: Culture ship names in PascalCase (e.g., `CongenitalOptimist`, `SleeperService`)
- **Folder Names**: lowercase-with-hyphens (e.g., `congenital-optimist/`, `sleeper-service/`)
- **Flake Outputs**: lowercase-with-hyphens (e.g., `nixosConfigurations.congenital-optimist`)
- **Hostnames**: lowercase-with-hyphens (e.g., `congenital-optimist`, `sleeper-service`)
- **User Names**: Culture character names in lowercase (e.g., `sma`, `geir`)
- [ ] **SleeperService** file server (Intel Xeon E3-1230 V2, 16GB RAM):
- NFS server for network storage
- Samba server for Windows compatibility
- Automated backup services
- System monitoring and alerting
- ZFS or software RAID for data redundancy
- [ ] **reverse-proxy** edge server:
- Nginx/Traefik reverse proxy
- Nginx/Traefik/caddy reverse proxy
- SSL/TLS termination with Let's Encrypt
- External access gateway and load balancing
- Security protection (Fail2ban, rate limiting)
- Minimal attack surface, headless operation
- [ ] **grey-area** application server (Culture GCU - versatile, multi-purpose):
- **Primary**: Forgejo Git hosting (repositories, CI/CD, project management)
- **Secondary**: Jellyfin media server, Nextcloud file sync
- **Monitoring**: Grafana visualization, Prometheus metrics
- **Secondary**: Jellyfin media server
- **Monitoring**: TBD
- **Infrastructure**: Container-focused (Podman), PostgreSQL database
- **Integration**: Central Git hosting for all home lab projects
- [ ] Plan for additional users across machines:
@ -343,10 +352,17 @@ Home-lab/
- [ ] Literate dotfiles with org-mode tangling automation
### 6.2 Automation & Maintenance
- [ ] AI integration - development of a mcp server for the cluster
- [ ] Automated system updates
- [ ] Configuration validation tests
- [ ] Deployment automation
- [ ] Monitoring and alerting
### 6.3 Writeup
- [ ] Take all the knowledge we have amassed and make a blog post or a series of blog posts
### Phase 7: goin pro
- [ ] A plan to generalise this project so it is usable for other people
- [ ] A plan to make dashboard and web interface for the project
## Timeline Estimates