@nobodyinperson@AngryAnt@raboof My problem is that I thought that NixOS is a solution to some issues I had with other Linux distros. That failed and I got additional issues as well.
When I have to setup my system, NixOS (and Nix) will be a part of my past.
@publicvoit@AngryAnt@raboof Same for NixOS. If a venv does the job for you, use my linked fhs command as the one thing to execute before doing anything Python, then do whatever venv stuff you need to do. If you don't need external system dependencies, do you really need nix?
@publicvoit@AngryAnt@raboof Well if you need any kind of dependency, a simple `python ./myscript.py` won't work on any distribution. Poetry or uv can ease that step of specifying and fetching dependencies, and work identically across distros. The only difference on #NixOS is that you will need to run everything from within an fhsUserEnv, e.g. execute my `fhs` command here before:
My experience so far which doesn't necessarily contradict your comment: if something is working, its "source" looks clean and you can reproduce it a number of times. 👍
However to get to that point in the first place, I had to bump into too many issues, rely on multiple experts on the Internet to help me with my specific issue until it somehow worked and I did not even understand all the mistakes I did which is a pity with respect to learning.
My most significant example: simply invoking a local #Python script.
Note that it took me half a year, at least six iterations of approaches including switching to poetry, various variations of nix-shells/shellscript combinations and so forth.
And this all for a task that is easy as "python3 ./myscript.py" on all(!) other operating systems.
@publicvoit@raboof Personally I had that same impression prior to taking on containers, but ended up concluding that this had been me over-estimating complexity.
It really is one of those areas where NixOS makes doing something complicated easy vs. other distros.
@publicvoit@raboof Personally I like to run my services in NixOS containers with private networking - often with their own network interface passed through.
@publicvoit@raboof Mitigations to avoid that initial foothold include: - Having most systemd services configured via NixOS options run with DynamicUser set, enabling lots of system isolation: https://unix.stackexchange.com/questions/635027/systemd-dynamicuser-vs-user#635036 - The nature & implementation of the nix store precludes whole classes of common exploits like library/dll injection and malicious patching. - You can comparatively easily add further isoation to potential entry points by declaring them in NixOS containers.