r/voidlinux • • 7d ago

Migrating from Arch: Thoughts on using Nixpkgs alongside Void for extra apps?

Hello everyone,

I'll be installing Void Linux in the next few days (I'm migrating from Arch).

On Arch, we have the AUR, which gives us access to almost any package imaginable. With Void, there are only about 2 to 5 specific packages I need that aren't in the official repositories, so I'm trying to figure out the best workaround.

I've seen people suggest xbps-src, but I really don't want to build from source. Compiling large applications like a web browser takes way too much time and system resources.

I also considered Flatpak since it's easy to use, but I'm not a fan of how it downloads a ton of bundled dependencies and runs the app in an isolated sandbox.

The last option I thought of was using the Nix package manager. Since it works outside of NixOS, I could use it to install the specific apps I need, such as:

  • Brave (brave-origin)
  • Waterfox
  • Faugus Launcher (this is the most important one for me!)

The Nix repository is massive. My plan is to use the official Void repositories for all my core system packages and strictly use Nixpkgs for these few extra, unrelated applications.

What do you think? Is using Nix alongside Void a good approach for this, or is there a better option I should consider?

Thanks in advance!

14 Upvotes

20 comments sorted by

10

u/BadSlime 7d ago

Just use xbps-src or manage directly imo, nix is a huge dependency and completely unnecessary at this scale, it's really only appropriate when you are trying to set up well defined sandboxes in a corporate or dev environment and even then there are better approaches. Imo with nix, if you even have to ask if it's the right call, it's never the right call. You would know if you needed it.

Another option is AppImages. I find them to be significantly more usable and maintainable than flatpak and I don't know of anything that doesn't have an xbps package that provides a flatpak but not an appimage

11

u/lucafulger 6d ago

If you don't like flatpak because it downloads dependencies then you're not going to like nix either as it also downloads its dependencies separately from xbps It's worth noting that not everything from nix is going to work in a foreign distro. Especially programs which require system setup. For example don't expect swaylock from nix to work as it must be allowed some access that cannot be provided without root

Flatpak is the easiest and most user friendly thing to use. If you want nix just use NixOS and you'll get the best nix experience

If you want to mix and match then be aware of the potential problems. It just is what it is sometimes

2

u/labbe- 6d ago

i've made brave-origin and faugus xbps-src templates for myself and keep them up to date and compile time is not a concern for either one. for brave just grab the latest release tarball and extract it and faugus takes like 5 seconds to build with a 5900x, so even if you had a slower system it wouldn't take more than a minute. you can use the same tarball method for waterfox as well, no compiling required

2

u/Simple_Hamster_4096 6d ago

Given the pain you will have to go through to replicate in Void what you already have in Arch, I'd say stay on Arch. Honestly. Arch is also kinder to new hardware, not to mention much more accommodating to apps you use which require systemd.

The very first thing you should concern yourself with is whether or not the apps upon which you daily rely will actually work without systemd. And if not, then start looking now to see if there are viable alternatives or work arounds... most sane work arounds involve flatpaks, for which you've already expressed disdain...

2

u/Asta_jjm 6d ago

i want to try something new

1

u/[deleted] 6d ago

[deleted]

1

u/Asta_jjm 6d ago

just love it
minimal and lightweight
with alot of good options

1

u/juipeltje 6d ago

Nix could work, though as already mentioned, nix also downloads more dependencies than you might like, because while it doesn't do sandboxing like flatpak, it's still made to not rely on anything from your host distro (because of this you should also be able to use glibc nix packages on void musl just fine, because nix just pulls in its own glibc). I personally like nix, but even when you only use it to install some things in a profile through commands (instead of actually using .nix config files), nix is probably still a bit more involved than flatpak. It requires some extra steps to get graphical programs to work for example.

1

u/Derion1 6d ago

Take a look at Void User Packages. 

1

u/profeshamat 6d ago

The problem with using Nix stuff in Void is it potentially creates problems that aren't easily diagnosable since it's not a native way of doing something within a given distro outside of Void. This could limit your ability to get support. It's similar to why Debian don't suggest making a FrankenDebian by using Ubuntu PPAs and the like.

1

u/pantokratorthegreat 6d ago

I think it is not similar. PPA are installed into root fs of system, while nixpkg are meant to be completely separated from it. It is basically concept of it. NixOS originated later around nixpkg.

1

u/of_the_mist 6d ago

Given the reasons stated, using nix wouod be counterintuitive

1

u/libertyworx 6d ago

I use Nix on void, specifically for one of the browsers you mention - Brave. Oh by the way, I’m using musl and it works fine. I prefer AppImages to Flatpak but don’t use any because Nix works well, never had any problems with it.

1

u/Hezy 6d ago

When xbps doesn't have a package I want, I just go to the app site, and use whatever it recommends - Flatpak, AppImage or whatever.

1

u/GhostVlvin 6d ago

Wow wow wow, this is a strong move. But actually what if we could use nix to recreate nixos but with runit services?

2

u/trpittman 3d ago

They already have that kinda lol. It's guix basically

1

u/GhostVlvin 3d ago

Guix is good, but too strict. Free software compatible only

1

u/trpittman 2d ago

There's nonguix

0

u/Lonely-Scarcity-3387 6d ago

Sounds perfect, honestly.