If the only thing holding you back from NixOS is my python comment, my issue was with Numpy, which really really demands that you install it globally. Pretty sure you can make it work by using a dev-shell, installing it globally in that shell, then doing everything else in that dev environment normally. I was newish to nixos at the time.
Otherwise I tend to fall back to ubuntu server, but only because it was something I knew. I prefered Centos7 back in the day before RedHat killed Centos. NixOS was my move from there. Been using Alpine as the os in my docker images, but havent really explored a lot of other recent linux os’s at the moment.
never tried flatpak, snaps were so bad as to never consider non-native installs or just use docker instances when I need to run something weird. so dunno.
whats the use case for a flatpak exactly? maybe im not the target audience???