assert node.os == 'arch'
assert node.metadata.get('systemd-boot/default') in node.metadata.get('systemd-boot/entries')

files = {
    '/etc/pacman.d/hooks/99-systemd-boot-update': {
        'source': 'pacman_hook',
    },
    '/boot/loader/loader.conf': {
        'content_type': 'mako',
        'context': {
            'config': node.metadata.get('systemd-boot'),
        },
        'mode': None,
    },
}

directories = {
    '/boot/loader/entries': {
        'purge': True,
    },
}

for entry, config in node.metadata.get('systemd-boot/entries').items():
    files[f'/boot/loader/entries/{entry}.conf'] = {
        'source': 'entry',
        'content_type': 'mako',
        'context': {
            'entry': entry,
            'config': config,
        },
        'mode': None,
    }