Nix as packagemanager - what entrypoint would you recommmend?

I run Debian12 on my laptop, because I am want to become used to Debian as a server OS.

However I am interested in the fresh stuff also and thought off nix as additional source for packages fresher then Debian’s. Namely things like git, Ansible, podman, kubectl, but also gui application like blender.

Now … looking at some things here and there I see that nix is vast, huge, endless and I am wondering whether, due to that, it can help with what I describe above, without taking up all focus trying to maneuver nix itself.

To be more specific … I want to use podman as my daily container driver but do not have any because I could not figure out yet how to get it from nix the right way. That said for now nix has distracted me from working with podman thus far rather then helping me to run the latest and greatest of it.

I looked at nix from 2 angles thus far

  1. nix-env → learned it should be avoided
  2. nix-shell → ephemeral more or less

on both end I felt to look into an abyss with the danger to getting absorbed completely by that before anything practically useful come out of it.

Let’s say, for starters I am not so much interested in the abilities to create isolated, or ephemeral environments. but want to use packages (as the aforementioned podman, Ansible, blender) regularly.

So what I am looking for is advice on which might be a good entrypoint into the nix world ?
Something like nix install podman, nix remove podman and then later down the road explore the other (obviously amazing) capabilities beyond such simple stuff.

Or Is it getting to learn how to use nix-shell in a certain fashion still?

the confusion start already with the distinction nix-shell vs nix shell which, as per man nix-shell

Disambiguation
This man page describes the command nix-shell, which is distinct from nix shell. For documentation on the latter, run nix shell --help or see man nix3-shell.

Anything that needs system-level config will not work by just getting the package from nixpkgs, so podman or blender is a no-go here. If it’s a standalone, no-config, non-graphical binary, you can use nix and install it how you wish. nix-shell’s usefulness for me is mostly for creating isolated development environments.

That being said, I would not use nix on foreign Linux to get newer packages on a stable distro, as you’re likely to have issues when apps are linked against newer glibc. It sort-of worked out on Arch as they’re relatively up-to-date. Though GUI apps never worked well.

I guess the main question is, why do you want to use nix?

1 Like

sorry, probably my mistake … I was not asking to just take packages from nix and throw them into a debian installation. I am aware that this makes no big sense.

what I stated in my original topic actually says it quite well

I run Debian12 on my laptop, because I am want to become used to Debian as a server OS.

However I am interested in the fresh stuff also and thought off nix as additional source for packages fresher then Debian’s.

for now, it looks like that might not be even is not possible, or a good idea.
Maybe I was mislead by the general notion I got saying nix can also be a package manager for non-nix systems.

It’s possible but the infra to do so is lacking; you’d have to rebuild the world to ensure compatibility with the base system, which may not even work for packages that really need the newer glibc, etc. This isn’t even nix’s fault but rather some fundamental designs of Linux systems. You’d even have problems with apt if you used a too-new PPA or whatnot. Stable base + unstable packages is generally unworkable on Linux unless you really commit time to ensuring compat.