Add update flake and skill creator skills
All checks were successful
Check Flake / check-flake (push) Successful in 3m14s

This commit is contained in:
2026-02-26 23:09:32 -08:00
parent 73633eaddc
commit 1d915f9524
10 changed files with 1250 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
---
name: update-flake
description: Update nix flake inputs to latest versions, fix build breakage from upstream changes, build all NixOS machines, and run garbage collection. Use when the user wants to update nixpkgs, update flake inputs, upgrade packages, or refresh the flake lockfile.
---
# Update Flake
## Workflow
### 1. Update All Inputs
The flake tracks `nixos-unstable`. Update everything at once:
```bash
nix flake update
```
### 2. Check for Breakage and Fix
Build errors typically fall into these categories:
- **Patches failing to apply**: Check `patches/` directory. Rebase or remove patches if the upstream issue was fixed.
- **Nextcloud version bump**: Check `common/server/nextcloud.nix` for the pinned version (e.g. `pkgs.nextcloud32`). If nixpkgs dropped the current version, upgrade by exactly ONE major version. Notify the user.
- **Removed/renamed packages or options**: Search nixpkgs history for migration guidance and apply fixes.
- **stateVersion changes**: If ANY change requires incrementing `system.stateVersion`, `home.stateVersion`, or data migration — STOP and ask the user. Do not proceed.
### 3. Build All Machines
See [references/machines.md](references/machines.md). Get machine list and build each:
```bash
nix eval .#nixosConfigurations --apply 'x: builtins.attrNames x' --json
nix build .#nixosConfigurations.<hostname>.config.system.build.toplevel --no-link
```
Fix any build failures before continuing.
### 4. Garbage Collection
```bash
nix store gc
```
### 5. Summary
Report: inputs updated, fixes applied, nextcloud changes, and anything needing user attention.

View File

@@ -0,0 +1,19 @@
# Machine Build Reference
## Listing Machines
Get the current list dynamically:
```bash
nix eval .#nixosConfigurations --apply 'x: builtins.attrNames x' --json
```
## Building a Machine
```bash
nix build .#nixosConfigurations.<hostname>.config.system.build.toplevel --no-link
```
## Important Constraints
- **stateVersion**: If any update requires incrementing `system.stateVersion` or `home.stateVersion`, or any data migration, STOP and ask the user. Do not proceed on your own.
- **nextcloud**: Pinned to a specific version (e.g. `pkgs.nextcloud32`). Only upgrade one major version at a time. Notify the user when upgrading.