image:
  distribution: nixos

source:
  downloader: nixos-http

targets:
  lxc:
    create_message: |
      You just created an {{ image.description }} container.

    config:
    - type: all
      after: 4
      content: |-
        lxc.include = LXC_TEMPLATE_CONFIG/common.conf

    - type: user
      after: 4
      content: |-
        lxc.include = LXC_TEMPLATE_CONFIG/userns.conf

    - type: all
      content: |-
        lxc.arch = {{ image.architecture_kernel }}

packages:
  custom_manager:
    clean:
      cmd: true
    install:
      cmd: true
    remove:
      cmd: true
    refresh:
      cmd: true
    update:
      cmd: true

files:
  - name: conf-hostname
    path: /etc/nixos/lxd.nix
    generator: template
    content: |-
      { lib, config, pkgs, ... }:

      # WARNING: THIS CONFIGURATION IS AUTOGENERATED AND WILL BE OVERWRITTEN AUTOMATICALLY

      {
        networking.hostName = "{{ instance.name }}";
      }
