3 Group configuration

Groups are defined in the file ${XDG_CONFIG_HOME}/tomloader/groups.kdl formatted as a KDL configuration file. Eachgroup is declared by using a def-group node:

def-group Group1 {
    sd {
        (section)Unit {
            (add) After "dbus.service" "pipewire.service"
            (add) Requisite "dbus.service" "pipewire.service"
            (reset) JoinsNamespaceOf
            (set) Description "Group1"
        }
    }
}
def-group Group2 {
    sd {
        (section) Unit {
            (set) Documentation "man:group(2)"
        }
        (section) Service {
            (set) Type "exec"
        }
    }
}

Each group may contain zero or more sd nodes containing rules for Systemd fields. Each sd node contains nodes with type section (enclosed in parenthesis) representing systemd sections (e.g. ‘Unit’, ‘Service’, ‘Slice’). Within each section, the following operations are supported as node types:

set

assigns one or more values to a field;

reset

clears the field;

add

adds one or more values to the field.

The names of the nodes with type section, set, reset, add is the section/field name represented by such node.

Field values are internally represented as a list of strings. Just before generating the systemd unit file each list of strings is merged into a single:

Note: The order of values is not preserved. If ordering is significant, a single set operation with a full-formed string value is sufficient.