Files
second-brain/01-plans/nixos/decommission-desktop-derivation.md
T
kiskaadee 8a59b093b8
Brain Structural Validation / Validate Markdown Structure & Links (push) Failing after 8s
infra(validator): add DirectoryContract validation and migration manifest
2026-09-28 15:58:11 -05:00

3.4 KiB
Raw Blame History

type, status, project, tags
type status project tags
plan completed nixos
nixos
flake
cleanup
refactor

Implementation Plan: Decommission Legacy Desktop Derivation

Goal Description

Decommission and remove the legacy desktop host configuration (nixosConfigurations.desktop and hosts/desktop/) from the repository.

Now that homelab services (homeserver.nix, traefik-deployments.nix, dynu.nix, SOPS secrets) have been completely stabilized on the dedicated server host, and the active workstation environment is running on laptop, the legacy dual-mode desktop derivation is obsolete and can be cleanly decommissioned.


User Review Required

Important

Branch Isolation: All modifications and deletions will take place on a dedicated branch refactor/decommission-desktop branched off main, allowing effortless rollback or recovery at any time.

Warning

Host Scope: Deleting hosts/desktop/ removes:

  • hosts/desktop/configuration.nix & specialisation.server
  • hosts/desktop/hardware-configuration.nix
  • hosts/desktop/home.nix & hosts/desktop/config/hypr/
  • Legacy duplicated homelab files (homeserver.nix, traefik-deployments.nix, dynu.nix, monitor.py, secrets.yaml)

All homelab functionality already exists independently in hosts/server/.


Proposed Changes

1. Branch Creation

  • Create and switch to refactor/decommission-desktop.

2. Flake Configuration

[MODIFY] flake.nix

  • Remove nixosConfigurations.desktop block (lines 95–121).
  • Active hosts remaining in flake.nix: server and laptop.

3. File Deletion

[DELETE] hosts/desktop/

  • Delete the entire hosts/desktop/ directory and all its contents:
    • hosts/desktop/configuration.nix
    • hosts/desktop/hardware-configuration.nix
    • hosts/desktop/home.nix
    • hosts/desktop/config/hypr/
    • hosts/desktop/dynu.nix
    • hosts/desktop/homeserver.nix
    • hosts/desktop/traefik-deployments.nix
    • hosts/desktop/monitor.py
    • hosts/desktop/secrets.yaml
    • hosts/desktop/ddclient.conf

4. Architecture & Documentation Sync

[MODIFY] architecture.md

  • Update topology diagram and description to reflect active hosts: server (Homelab) and laptop (Workstation).
  • Remove references to desktop specialization invariant.

[MODIFY] AGENTS.md

  • Update validation commands from desktop to server and laptop.
  • Update host validation matrix to reflect active hosts.

[MODIFY] README.md

  • Remove legacy hosts/desktop/ references from the directory map and documentation.

Verification Plan

Automated Tests

  1. Flake Check:

    nix flake check
    

    Ensures flake metadata and all remaining host configurations (server and laptop) evaluate without errors.

  2. Dry-Build System Targets (Build, Never Switch):

    nix build .#nixosConfigurations.server.config.system.build.toplevel --no-link
    nix build .#nixosConfigurations.laptop.config.system.build.toplevel --no-link
    

    Both remaining hosts must compile cleanly.

  3. Verify Desktop Derivation Is Removed:

    nix eval .#nixosConfigurations --apply builtins.attrNames
    

    Expected output: [ "laptop" "server" ]

Manual Verification

  1. git status inspection to ensure no untracked or unwanted deletions occurred.
  2. Confirm git log and commit history on the dedicated branch.