def generate_service_configs(n):
    """
    Recursively generate list of all possible configurations of n services, where:

    N.B First permutation in list is always the all True permutation and final
    permutation in list is always the all False permutation.

    perms[1] = [True, True, ..., True]
    perms[-1] = [False, False, ..., False]

    Arguments:
        int n : number of services

    Returns:
        list[list[bool]] perms : list of list of bools of all possible configurations of n services
    """
    # base cases
    if n <= 0:
        return []
    if n == 1:
        return [[True], [False]]

    perms = []
    for p in generate_service_configs(n - 1):
        perms.append([True] + p)
        perms.append([False] + p)
    return perms