I Started With #Nix, #NixOS, #HomeManager and #Flakes https://www.karl-voit.at/2023/09/12/nix/ 鉂勶笍

My whole story about changing my #Linux distro from #Xubuntu to NixOS and what I've learned so far.

If you would like to learn what Nix is and find out if this is something for you, you might be interested in my article.

#publicvoit #xfce

I Started With Nix, NixOS, Home Manager and Flakes

I Started With Nix, NixOS, Home Manager and Flakes

public voit - Web-page of Karl Voit
@publicvoit Very nice article that also lists many pain points I am having as a fresh  #NixOS switcher. #Python environments are indeed clunky in my experience. I currently also settled on providing a pinned Python in a nix(-shell) environment, then using poetry (also tried Pipenv) to manage the venv. buildFHSUserEnv might be necessary to get rid of nasty library-not-found errors. #poetry2nix sounds like the solution, but hasn't worked for me yet.
@nobodyinperson I don't know all those tools but it sounds like it adds substantial complexity and maybe compatibility with non-Nix-systems is broken.
@publicvoit Compatibility with non-NixOS is also a top-priority for me. poetry itself is just a (very good) venv/packaging manager for Python, so that's definitely cross-OS. non-NixOS-users can just use 'poetry shell' and be in the correct environment, though with their system's Python. That part can be pinned with nix, e.g. by entering the nix-shell. There's however still Python-related quirks when using the nix-shell on non-NixOS, so I guess we can't have nice things... 馃檮

@nobodyinperson To be honest, I truly understood the correct way of invoking Python tools within venv in the last year.

I'm not sure if I want to invest effort in migrating all of my Python projects to yet another system. 馃様

So hard-wiring Python looks promising to me at the moment.

@publicvoit Yeah sure, I was at the same 'uuugh why yet another tool' spot (I haven't even used venvs until recently! pip install --user ftw!). poetry turned out to be working well, with proper version pinning (better than requirements.txt, with hashes and all) and automatic creation of a venv (either in your current dir or in a standard location). So far, it has added very little friction for me. But use the tool that works for you, of course. Pinning Python with nix, then manual venv is fine.

@publicvoit After giving #poetry2nix another try, my conclusion is that it's quite messy. I still couldn't get it to work. You need to manually tell it the build systems and it relies on many (all?) packages being packaged in #nix. The 'whey' package isn't - so dead end. (because that's part of the build system?).

This is how far I came:

https://gitlab.com/tue-umphy/software/parmesan/-/blob/poetry2nix/shell.nix?ref_type=heads

Should be possible to package this whey thing right in that shell.nix but I'm ignorant as to how (https://nixos.wiki/wiki/Packaging/Python). 馃し

shell.nix 路 poetry2nix 路 UMPHY / Software / 馃 PARMESAN 路 GitLab

Python Atmospheric Research package for MEteorological TimeSeries and Turbulence ANalysis

GitLab
@nobodyinperson Most thinks I need venv for are my own tools which I don't necessarily want to package for Nix.

@publicvoit
Regarding your LUKS password issue. Could it be that you are using a LVM block (?) on the machine where you have to type in the password once?
And on the other host you have to decrypt ever single partition?

I think i have the latter case on my guix setup, which u did manually. The former on my NixOS hosts per installer.

#Nix #NixOS #HomeManager #Flakes #Linux #Xubuntu #publicvoit #xfce

@chfkch I've got no LVM on my systems as the NixOS installer doesn't support it and I don't need it on a single-SSD-system IMHO.

Yesterday evening I was discussing the issue with friends. Current guess: the system which asks only once does encrypt boot and therefore Grub needs to ask for the passphrase (which takes longer because AES-CPU-subsystem isn't available yet).

I only have to decrypt once.

@publicvoit

#debian user here. Firefox is updated by apt. Not self updated.

It's strange you tell observing self update. Where you using the official debian package of the ESR version? Did you active unattended-upgrade?

@tuxicoman That might be the case for ESR which I'm not using.

My Debian stable (and my previous Xubuntu) runs non-ESR. I can update FF via apt while self-update runs in parallel. Weird situation.

@publicvoit can you point me to which package on debian website? I only see esr
How to Install Firefox DEB on Ubuntu (Not Snap) - OMG! Ubuntu

A short guide on how to install Firefox from a PPA on Ubuntu 22.04 and remove the Firefox Snap. Doing this gets you a faster Firefox that can do more OOTB.

OMG! Ubuntu
@publicvoit @tuxicoman Those instructions suggest using a PPA which is not appropriate for Debian. To get the "current" Firefox I installed a download from the FF page and that one self updates. (On Debian Buster, which has migrated to Bullseye and now Bookworm.)
@publicvoit very interesting. I had read about nix as an alternative to homebrew but have not looked deeply into NixOS. This post has me wanting to grab a laptop or nuc and test it out.

@greg or a virtual host 馃槈

Have fun but be aware that there are many things completely different than usual...

@publicvoit or that but I want to add a Nuc or thinkcentre or [insert option] to my lab for experiments anyway.