export BB_REGISTRY := "registry.gitlab.com"
export BB_REGISTRY_NAMESPACE := "wunker-bunker/wunker-os"

generate-iso recipe tag="latest":
    #!/usr/bin/env nu
    let name = open {{ recipe }} | get name
    let image = $'(
            $env.BB_REGISTRY
        )/(
            $env.BB_REGISTRY_NAMESPACE
        )/(
            $name
        ):{{ tag }}'
    (^bluebuild
        generate-iso
        --iso-name $'($name).iso'
        --output-dir .iso/
        --variant kinoite
        image $image)

generate-secureboot-key:
    openssl req -config ./openssl.cnf \
        -new -x509 -newkey rsa:2048 \
        -nodes -days 36500 -outform DER \
        -keyout ./.secure-files/MOK.priv \
        -out ./files/base/etc/pki/akmods/certs/akmods-wunker-bunker.der
