diff options
| author | Mel <einebeere@gmail.com> | 2024-12-30 17:37:57 +0100 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2024-12-30 17:37:57 +0100 |
| commit | 0f5851ea94cb14a55aa150aaba3f554b5ef5a10b (patch) | |
| tree | f6020bb3018a341fec4f58ca1aa2824dd1d5ba47 | |
| parent | 05761d7504d114d8d5ad5a69a54eb66da91eec04 (diff) | |
| download | specimen-0f5851ea94cb14a55aa150aaba3f554b5ef5a10b.tar.zst specimen-0f5851ea94cb14a55aa150aaba3f554b5ef5a10b.zip | |
Pass cloud-init preseed in a YAML string
Signed-off-by: Mel <einebeere@gmail.com>
| -rw-r--r-- | configuration/vm/incus.nix | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/configuration/vm/incus.nix b/configuration/vm/incus.nix index ab8e6ee..3a802a2 100644 --- a/configuration/vm/incus.nix +++ b/configuration/vm/incus.nix @@ -1,11 +1,14 @@ { config, + lib, pkgs, credentials, ... }: let + toYAML = lib.generators.toYAML { }; + cloudInitConfiguration = { users = [ (with credentials.mel; { @@ -58,7 +61,7 @@ in # `vendor` is usually for defaults, but it doesn't actually matter here. # NOTE: cloud-init requires either the incus-agent to be running, # or that the image is a special cloud image. i.e. `images:ubuntu/22.04/cloud`. - "cloud-init.vendor-data" = cloudInitConfiguration; + "cloud-init.vendor-data" = toYAML cloudInitConfiguration; }; devices = { # this is the internal vm network, |
