1.3 KiB
images
This module is for building and managing blessed images for deployment within a cluster.
This uses nix-generators to build images. See the nix-generators
documentation to learn how to create and make changes to the flake.nix.
It's important not to include any secrets during the image building phase, as secrets would be added to the nix store,
world-writable. Secret management is done in the operator module, after an image has been deployed.
Building images
To build an image declared in flake.nix, run the following
nix build .#IMAGE_NAME
e.g. For an image named qemu: nix build .#qemu
Deploying and uploading images
nxm provides utilities for deploying/uploading images to various providers.
Built images may be deployed/uploaded to cloud providers, to be launched in a deployment.
Linode example
This module provides the linode-cli utility for managing linode.
First, authenticate to Linode:
linode-cli configure
Next, we can upload a previously built images, see Building images.
nixos-generators always place Linode images at ./result/nixos.img.gz.
To upload a Linode image, use linode-cli as follows:
linode-cli image-upload --label "" --description "A NixOS image" --region "" result/nixos.img.gz