dotfiles-ansible/roles/system/tasks/main.jsonnet

40 lines
698 B
Plaintext

local task(item) =
local type = std.type(item);
if type == 'string' then
{
name: 'Configure ' + item,
import_tasks: item + '.yml',
tags: item,
}
else if type == 'object' then
{
name: 'Configure ' + item.name,
import_tasks: item.name + '.yml',
tags: [item.name],
} + item.opts
else {};
local modules = [
'acpi',
'apparmor',
'auditd',
'cron',
'devd',
'dns',
'earlyoom',
'essential',
'fstab',
'libvirt',
'networking',
'nftables',
'ntpd',
'seat',
'snapshot',
{ name: 'tlp', opts: { tags+: ['laptop'] } },
'usbguard',
'user',
'zram',
];
std.manifestYamlDoc([task(x) for x in modules], quote_keys=false)