What you are asking for is related to perpetual motion machine of second kind and impossible under any physical laws.
Simply put, energy can not be created, nor destroyed, it can only be moved from place with high density of energy to place with low energy density, while taking some of the moved energy to make other work in the process.
Above simple explanation refers to every and all processes. Imagine having a river, you build turbines in the stream. Water on high ground has higher energy density (potential energy), water on low ground has lower energy density, normally difference is dissipated through friction and other processes. Your turbines, however, take some of the energy and produce the electricity, but you can't use this energy to power pumps that would move water back to high ground, energy produced is much lower than energy difference between height levels. You need to rely on other processes to refill your high-ground reservoir. In this case you rely on sun to evaporate water which later condenses and falls as rain, filling rivers and lakes. Same applies to every and all processes.
In theory, using reversible processes, you can have machine that can move forever, but without producing any useful work - orbiting planets come very close, they lose very little kinetic energy and seemingly move forever, but if you took any of that energy to do useful work, it would slow the planet down.
That being said, there are some solutions, depending on what your story requires and how "soft" you are willing to go with sci-fi aspect.
First: floating. Floating requires actively counteracting gravitation, that's bad as it requires huge energy expenditure if you are actively using engines for that. It's great if you can replace that with orbiting. Douglas Adams wrote that flying is an art of falling and missing the planet. It's a great joke, but when referring to orbiting, it's completely true - you constantly fall, but your forward speed is high enough that you "miss" the earth and stay in space. If they have to float in atmosphere, make them Zeppelins - obtaining hydrogen to replace lost gas is trivial compared to other problems of self-contained city.
Second: energy. You need energy reservoir, usually called "fuel", and you need to "refuel" your generators from time to time, that's unavoidable if you want to go the semi-hard sci-fi route. Best you can do to avoid maintenance is automation, here are some wild ideas that can be scaled and are relatively easily refuelled by robotic ships.
- Implosion based fusion may be hugely scalable - take plastic pellet filled with deuterium, heat it with laser to explosively vaporise it, imploding deuterium and forcing fusion. It's proven to work and is theorised to be workable as portable power source. Assume that same can be done with hydrogen, power your islands by tokamaks or just hundreds of scaled up generators and let your humans mine outer layers of sun for hydrogen. Not infinite, but effectively a non-concern unless you start spending that energy on matter+antimatter creation to build entire planets.
- There are some unknowns about CPT symmetry where you could probably hide errors and small lies leading to direct matter->energy conversion, without necessitating antimatter (antimatter can't be mined, so using antimatter for fuel is like pumping water upstream). This isn't even remotely theorised so you can go wild with scalability, either way, you are constrained by E=m*c^2.
- Evaporation of black holes. BH the mass of Earth would have event horizon only 3 cm in diameter, and slowly evaporate. The smaller the BH, the faster it emits energy. Claim that there's "sweet-spot" size where BHs live relatively long and emit enough energy to be useful as energy sources. Use fusion energy or something like that to force collapse of progressively larger objects until you reach sweet-spot size. Make sweet-spot mass to be in the order of magnitude of asteroid masses for islands and few kilograms for personal generators, that way you have a lot of fuel on your hands. Warning: I haven't researched exact values and you are still constrained by E=m*c^2 anyway.
If nothing of the above fancies you, just go "the black box route" and have aliens or insane genius invent it. Humans in your world don't have to understand how it works to replicate it - you don't need understanding of thermodynamics or chemistry to build car engine if you are given blueprints, but you need thermodynamics, chemistry and a lot more to improve it or scale it in any way other than adding more cylinders. Impart some limits on characteristics so that this device can't be an answer to all and every need, because that would make a boring story, and you can have some stories where people try to figure out how to solve problems with more energy, or have to rework their solutions when one of the devices malfunctions.