ncm/build
2025-04-22 11:58:41 -06:00
..
secrets feat: building and deploying to linode 2025-04-14 08:14:02 -06:00
systems/default feat: linode volumes working 2025-04-17 19:25:54 -06:00
flake.lock feat: building and deploying to linode 2025-04-14 08:14:02 -06:00
flake.nix feat: building and deploying to linode 2025-04-14 08:14:02 -06:00
README.md feat: building and deploying to linode 2025-04-14 08:14:02 -06:00

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