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 ## 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. 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 ## Current System Information
- **Hostname**: work (consider renaming to congenital-optimist) - **Hostname**: work → congenital-optimist (migration in progress)
- **Current Version**: NixOS 23.11 - **Current Version**: NixOS 25.05 (migrated from 23.11)
- **Target Version**: NixOS 25.05 - **Target Version**: NixOS 25.05
- **Architecture**: x86_64-linux - **Architecture**: x86_64-linux
- **Storage**: ZFS (zpool for system, stuffpool for data) - **Storage**: ZFS (zpool for system, stuffpool for data)
- **Hardware**: AMD CPU/GPU - **Hardware**: AMD CPU/GPU
- **User**: geir - **Users**: geir (primary), sma (admin)
- **Dotfiles Approach**: Literate programming with Emacs org-mode (no Home Manager) - **Dotfiles Approach**: Literate programming with Emacs org-mode (no Home Manager)
## Current Module Structure ## Current Module Structure
@ -21,17 +45,29 @@ Home-lab/
│ │ ├── configuration.nix (main system config) │ │ ├── configuration.nix (main system config)
│ │ ├── hardware-configuration.nix │ │ ├── hardware-configuration.nix
│ │ └── About.org │ │ └── About.org
│ └── modules/ │ ├── sleeper-service/
│ ├── common/ │ ├── reverse-proxy/
│ │ ├── base.nix (modern CLI tools & aliases) │ └── grey-area/
│ │ └── tty.nix (console styling with Joker theme) ├── modules/
│ └── virtualization/ │ ├── common/
│ ├── podman.nix │ │ ├── base.nix (modern CLI tools & aliases)
│ ├── libvirt.nix │ │ ├── tty.nix (console styling with Joker theme)
│ └── incus.nix │ │ └── nix.nix (flakes configuration)
└── Users/ │ ├── 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/
└── geir/ └── geir/
└── user.nix (has typo: progtams → programs) └── dotfiles/ (literate org-mode configs)
``` ```
## Prerequisites Check ## Prerequisites Check
@ -40,7 +76,7 @@ Before starting, verify:
2. ZFS pools are healthy (`zpool status`) 2. ZFS pools are healthy (`zpool status`)
3. All referenced modules exist and are working 3. All referenced modules exist and are working
4. User has sudo/root access 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 ## Step 1: Fix Existing Configuration Issues

36
plan.md
View file

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