30 lines
766 B
Markdown
30 lines
766 B
Markdown
# Incus VM Build and Deploy
|
|
|
|
## Quick Start
|
|
|
|
### Prerequisites:
|
|
|
|
Add your forgejo runner token in 1Password at `op://forgejo-runner/forgejo-runner/runner_token`
|
|
|
|
### Build, import, and deploy
|
|
|
|
```sh
|
|
mise run build_import
|
|
mise run launch
|
|
```
|
|
|
|
## Manually
|
|
|
|
### Build
|
|
|
|
```sh
|
|
qemuImageBuildPath=$(nix build .#nixosConfigurations.lxc-vm-x86_64.config.system.build.qemuImage --print-out-paths)
|
|
metadataBuildPath=$(nix build .#nixosConfigurations.lxc-vm-x86_64.config.system.build.metadata --print-out-paths)
|
|
```
|
|
|
|
### Deploy
|
|
|
|
```sh
|
|
incus image import --alias nixos-gen/custom/lxc-vm-x86_64 ${metadataPath}/tarball/nixos-system-x86_64-linux.tar.xz ${qemuImageOutputPath}/nixos.qcow2
|
|
incus file push "$TOKEN_FILE" "$INCUS_INSTANCE/var/lib/forgejo/$TOKEN_FILE" --mode 400
|
|
```
|