mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-01-11 22:30:25 +01:00
feat: add a test k3s cluster running on kubevirt
This commit is contained in:
19
utils.nu
19
utils.nu
@@ -53,3 +53,22 @@ export def darwin-switch [
|
||||
export def darwin-rollback [] {
|
||||
./result/sw/bin/darwin-rebuild --rollback
|
||||
}
|
||||
|
||||
# ==================== Virutal Machines related =====================
|
||||
|
||||
# Build and upload a VM image
|
||||
export def upload-vm [
|
||||
name: string
|
||||
mode: string
|
||||
] {
|
||||
let target = $".#($name)"
|
||||
if "debug" == $mode {
|
||||
nom build $target --show-trace --verbose
|
||||
} else {
|
||||
nix build $target
|
||||
}
|
||||
|
||||
let remote = $"root@rakushun:/var/lib/caddy/fileserver/vms/kubevirt-($name).qcow2"
|
||||
rsync -avz --progress --copy-links result $remote
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user