4 Unit configuration

To generate a systemd unit named unitname.ext, a corresponding KDL-formatted unit configuration file named unitname.ext.kdl must be provided.

You can use the pull, replace (but not merge), envs and sd nodes inside each unit configuration file to describe your systemd unit, see Group configuration, Environment variables and Dependencies for a description of these nodes.

Example:


pull {
    (group) Group1
    Group2
}
sd {
    (section) Unit {
        (set) Description "Unit"
    }
    (section) Service {
        (set) ExecStart "/usr/bin/bash"
    }
}

Just like the respective nodes inside group specification, you can use the pull node for listing groups to include, and the replace node for listing groups to exclude.