This commit is contained in:
ari committed 2026-09-03 23:18:08 -04:00
1 parent f2f6ce0ec1
commit dca14c1a78
11 files changed
+128 -15

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@ bin/
| `skyg remote switch <host>` | Deploy to a remote host |
| `skyg hm switch` | Apply Home Manager config |
| `skyg update [input]` | Update flake inputs |
| `skyg build-iso` | Build bootable ISO |
| `skyg build-image iso|pi1|pi2` | Build bootable image — ISO (`iso`) or Pi SD card image (`pi1`, `pi2`) |
| `skyg openwrt` | Deploy OpenWrt config |
| `skyg rollback` | Roll back to previous generation |
| `skyg profiles` | List valid local/remote profiles |
+12 -11
View File
@@ -308,18 +308,19 @@ export def "skyg openwrt" [
}
}
# Build ISO image
export def "skyg build-iso" [] {
# Build a bootable image: ISO, or Pi SD card image (fully-baked, no on-device rebuild)
export def "skyg build-image" [
target: string@image-targets
] {
cd $REPO_ROOT
nix build .#nixosConfigurations.iso.config.system.build.isoImage
ls -l result/iso
}
# Build hl-pi1 SD card image (fully-baked, no on-device rebuild needed)
export def "skyg build-pi-sd-image" [] {
cd $REPO_ROOT
nix build .#nixosConfigurations.hl-pi1-sd-image.config.system.build.sdImage
ls -l result/sd-image
let spec = (match $target {
"iso" => { config: "iso", out: "iso", attr: "isoImage" }
"pi1" => { config: "hl-pi1-sd-image", out: "sd-image", attr: "sdImage" }
"pi2" => { config: "hl-pi2-sd-image", out: "sd-image", attr: "sdImage" }
_ => { error make { msg: $"Unknown image target '($target)'. Expected: iso, pi1, pi2" } }
})
nix build $".#nixosConfigurations.($spec.config).config.system.build.($spec.attr)"
ls -l $"result/($spec.out)"
}
# Home Manager operations
+4
View File
@@ -8,6 +8,10 @@ export def remote-cmds [] {
["test", "dry-activate", "run", "switch", "build", "boot"]
}
export def image-targets [] {
["iso", "pi1", "pi2"]
}
export def secret-names [] {
cd $REPO_ROOT