Compare commits
1 Commits
bead/nixos
...
bead/nixos
| Author | SHA1 | Date | |
|---|---|---|---|
| 513f6cb8b4 |
@@ -1,130 +0,0 @@
|
|||||||
---
|
|
||||||
description: Import open Gitea issues as beads, skipping already-imported ones
|
|
||||||
---
|
|
||||||
|
|
||||||
# Import Gitea Issues as Beads
|
|
||||||
|
|
||||||
This skill imports open Gitea issues as beads, checking for duplicates to avoid re-importing already tracked issues.
|
|
||||||
|
|
||||||
## Prerequisites
|
|
||||||
|
|
||||||
- `tea` CLI must be installed and configured for the repository
|
|
||||||
- `bd` (beads) CLI must be installed
|
|
||||||
- Must be in a git repository with a Gitea/Forgejo remote
|
|
||||||
|
|
||||||
## Workflow
|
|
||||||
|
|
||||||
### Step 1: Get open Gitea issues
|
|
||||||
|
|
||||||
List all open issues using `tea`:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
tea issues
|
|
||||||
```
|
|
||||||
|
|
||||||
This returns a table with columns: INDEX, TITLE, LABELS, MILESTONE
|
|
||||||
|
|
||||||
### Step 2: Get existing beads
|
|
||||||
|
|
||||||
List all current beads to check what's already imported:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
bd list
|
|
||||||
```
|
|
||||||
|
|
||||||
Also check bead notes for issue URLs to identify imports:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
bd list --json | jq -r '.[] | select(.notes != null) | .notes' | grep -oP 'issues/\K\d+'
|
|
||||||
```
|
|
||||||
|
|
||||||
### Step 3: Check for already-linked PRs
|
|
||||||
|
|
||||||
Check if any open PRs reference beads (skip these issues as they're being worked on):
|
|
||||||
|
|
||||||
```bash
|
|
||||||
tea pr list
|
|
||||||
```
|
|
||||||
|
|
||||||
Look for PRs with:
|
|
||||||
- Bead ID in title: `[nixos-configs-xxx]`
|
|
||||||
- Bead reference in body: `Implements bead:` or `Bead ID:`
|
|
||||||
|
|
||||||
### Step 4: For each untracked issue, create a bead
|
|
||||||
|
|
||||||
For each issue not already tracked:
|
|
||||||
|
|
||||||
1. **Get full issue details**:
|
|
||||||
```bash
|
|
||||||
tea issue [ISSUE_NUMBER]
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **Determine bead type** based on issue content:
|
|
||||||
- "bug" - if issue mentions bug, error, broken, fix, crash
|
|
||||||
- "feature" - if issue mentions feature, add, new, enhancement
|
|
||||||
- "task" - default for other issues
|
|
||||||
|
|
||||||
3. **Create the bead**:
|
|
||||||
```bash
|
|
||||||
bd add "[ISSUE_TITLE]" \
|
|
||||||
--type=[TYPE] \
|
|
||||||
--priority=P2 \
|
|
||||||
--notes="Gitea issue: [ISSUE_URL]
|
|
||||||
|
|
||||||
Original issue description:
|
|
||||||
[ISSUE_BODY]"
|
|
||||||
```
|
|
||||||
|
|
||||||
Note: The `--notes` flag accepts multi-line content.
|
|
||||||
|
|
||||||
### Step 5: Report results
|
|
||||||
|
|
||||||
Present a summary:
|
|
||||||
|
|
||||||
```
|
|
||||||
## Gitea Issues Import Summary
|
|
||||||
|
|
||||||
### Imported as Beads
|
|
||||||
| Issue | Title | Bead ID | Type |
|
|
||||||
|-------|-------|---------|------|
|
|
||||||
| #5 | Add dark mode | nixos-configs-abc | feature |
|
|
||||||
| #3 | Config broken on reboot | nixos-configs-def | bug |
|
|
||||||
|
|
||||||
### Skipped (Already Tracked)
|
|
||||||
| Issue | Title | Reason |
|
|
||||||
|-------|-------|--------|
|
|
||||||
| #4 | Update flake | Existing bead: nixos-configs-xyz |
|
|
||||||
| #2 | Refactor roles | PR #7 references bead |
|
|
||||||
|
|
||||||
### Skipped (Other)
|
|
||||||
| Issue | Title | Reason |
|
|
||||||
|-------|-------|--------|
|
|
||||||
| #1 | Discussion: future plans | No actionable work |
|
|
||||||
```
|
|
||||||
|
|
||||||
## Type Detection Heuristics
|
|
||||||
|
|
||||||
Keywords to detect issue type:
|
|
||||||
|
|
||||||
**Bug indicators** (case-insensitive):
|
|
||||||
- bug, error, broken, fix, crash, fail, issue, problem, wrong, not working
|
|
||||||
|
|
||||||
**Feature indicators** (case-insensitive):
|
|
||||||
- feature, add, new, enhancement, implement, support, request, want, would be nice
|
|
||||||
|
|
||||||
**Task** (default):
|
|
||||||
- Anything not matching bug or feature patterns
|
|
||||||
|
|
||||||
## Error Handling
|
|
||||||
|
|
||||||
- **tea not configured**: Report error and exit
|
|
||||||
- **bd not available**: Report error and exit
|
|
||||||
- **Issue already has bead**: Skip and report in summary
|
|
||||||
- **Issue is a PR**: Skip (tea shows PRs and issues separately)
|
|
||||||
|
|
||||||
## Notes
|
|
||||||
|
|
||||||
- Default priority is P2; adjust manually after import if needed
|
|
||||||
- Issue labels from Gitea are not automatically mapped to bead tags
|
|
||||||
- Run this periodically to catch new issues
|
|
||||||
- After import, use `bd ready` to see which beads can be worked on
|
|
||||||
@@ -8,6 +8,21 @@ in
|
|||||||
{
|
{
|
||||||
options.roles.nfs-mounts = {
|
options.roles.nfs-mounts = {
|
||||||
enable = mkEnableOption "Enable default NFS mounts";
|
enable = mkEnableOption "Enable default NFS mounts";
|
||||||
|
server = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "10.0.0.43";
|
||||||
|
description = "IP address or hostname of the NFS server";
|
||||||
|
};
|
||||||
|
remotePath = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "/media";
|
||||||
|
description = "Remote path to mount from the NFS server";
|
||||||
|
};
|
||||||
|
mountPoint = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "/media";
|
||||||
|
description = "Local mount point for the NFS share";
|
||||||
|
};
|
||||||
# TODO: implement requireMount
|
# TODO: implement requireMount
|
||||||
requireMount = mkOption {
|
requireMount = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
@@ -18,8 +33,8 @@ in
|
|||||||
|
|
||||||
config = mkIf cfg.enable
|
config = mkIf cfg.enable
|
||||||
{
|
{
|
||||||
fileSystems."/media" = {
|
fileSystems.${cfg.mountPoint} = {
|
||||||
device = "10.0.0.43:/media";
|
device = "${cfg.server}:${cfg.remotePath}";
|
||||||
fsType = "nfs";
|
fsType = "nfs";
|
||||||
options = [
|
options = [
|
||||||
"defaults"
|
"defaults"
|
||||||
|
|||||||
@@ -8,6 +8,21 @@ in
|
|||||||
{
|
{
|
||||||
options.roles.printing = {
|
options.roles.printing = {
|
||||||
enable = mkEnableOption "Enable default printing setup";
|
enable = mkEnableOption "Enable default printing setup";
|
||||||
|
printerName = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "MFC-L8900CDW_series";
|
||||||
|
description = "Name for the default printer";
|
||||||
|
};
|
||||||
|
printerUri = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "ipp://brother.oglehome/ipp/print";
|
||||||
|
description = "Device URI for the default printer (e.g., ipp://hostname/ipp/print)";
|
||||||
|
};
|
||||||
|
printerModel = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "everywhere";
|
||||||
|
description = "PPD model for the printer (use 'everywhere' for driverless IPP)";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable
|
config = mkIf cfg.enable
|
||||||
@@ -21,11 +36,11 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
hardware.printers.ensurePrinters = [{
|
hardware.printers.ensurePrinters = [{
|
||||||
name = "MFC-L8900CDW_series";
|
name = cfg.printerName;
|
||||||
deviceUri = "ipp://brother.oglehome/ipp/print";
|
deviceUri = cfg.printerUri;
|
||||||
model = "everywhere";
|
model = cfg.printerModel;
|
||||||
}];
|
}];
|
||||||
hardware.printers.ensureDefaultPrinter = "MFC-L8900CDW_series";
|
hardware.printers.ensureDefaultPrinter = cfg.printerName;
|
||||||
|
|
||||||
# Fix ensure-printers service to wait for network availability
|
# Fix ensure-printers service to wait for network availability
|
||||||
systemd.services.ensure-printers = {
|
systemd.services.ensure-printers = {
|
||||||
|
|||||||
@@ -8,6 +8,11 @@ in
|
|||||||
{
|
{
|
||||||
options.roles.virtualisation = {
|
options.roles.virtualisation = {
|
||||||
enable = mkEnableOption "Enable virtualisation";
|
enable = mkEnableOption "Enable virtualisation";
|
||||||
|
dockerUsers = mkOption {
|
||||||
|
type = types.listOf types.str;
|
||||||
|
default = [ "johno" ];
|
||||||
|
description = "List of users to add to the docker group";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable
|
config = mkIf cfg.enable
|
||||||
@@ -15,6 +20,6 @@ in
|
|||||||
virtualisation.libvirtd.enable = true;
|
virtualisation.libvirtd.enable = true;
|
||||||
programs.virt-manager.enable = true;
|
programs.virt-manager.enable = true;
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
users.extraGroups.docker.members = [ "johno" ];
|
users.extraGroups.docker.members = cfg.dockerUsers;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user