Nix and NeoVim

preview_player
Показать описание
Recorded live on twitch, GET IN

Become a backend engineer. Its my favorite site

This is also the best way to support me is to support yourself becoming a better backend engineer.

MY MAIN YT CHANNEL: Has well edited engineering videos

Discord

Hey I am sponsored by Turso, an edge database. I think they are pretty neet. Give them a try for free and if you want you can get a decent amount off (the free tier is the best (better than planetscale or any other))
Рекомендации по теме
Комментарии
Автор

Hi !
Thanks Prime for reacting !

Maintainer of Nixvim here (the guy from the Neovim conf).
About the exrpessiveness of the nixvim config, you can embed raw lua code basically anywhere.

Btw, Prime, whenever you want co-stream to port your own config to nixvim (maybe with TheAltF4). I would be glad to help you get a first introduction to Nix.
Thanks for everything Prime, you rock :)

GaetanLepage
Автор

👉👈 gotta admit guys... I'm a little nix curious uwu

TheDadlysin
Автор

Honestly i think NixOS would suit ThePrimeagen really well.

He has three discipline to keep it simple and not get distracted by crafting the perfect nix abstractions.

On the other hand it gives you the advantage of a configuration that didn't change unless you change it. No more reading through arch Linux news to see why your upgrade isn't working. And a vast package repo - no more waiting for AUR builds and getting errors because they are never kept up to date. And if you do want to build a package differently to the standard repo, you can do it through the same nix configuration and your builds will update with your system.

The downside is that now and then there is stuff that isn't packaged for nix and nix is so different to normal Linux that it can be a lot of work to get it to run.

maninalift
Автор

Nix and NixOS are truly impressive. You can declare configurations once and reuse them across various Linux distributions with minimal and quick adjustments. By pinning all dependencies, you ensure consistency. If you leverage flakes, you can seamlessly combine different stable and unstable releases of packages in one config. Working with flakes and direnv feels like magic – just navigate to the directory, and voila! All declared dependencies are linked to your PATH. Each project can even have different versions of a given package.

While the power of Nix is evident, configuring it can be challenging. Not because the Nix language is hard to understand or unreadable, but due to the lack of comprehensive documentation and the fact that Nix is not very mainstream. Consequently, "ready solutions" for problems are not always available.

nafuranyleniwiec
Автор

“It’s all in the docs” The issue with nix documentation is that it is not written for a user. It assumes you are already very familiar with nix. This isn’t helped that it is all over the place and seems to not have a consensus on best practices.
The Docs were one of the two points that drove me away from nix/nixos. With a system that does things so drastically different to “standard” Linux you have to have solid documentation for users.

haariger_wookie
Автор

Nix arc would be tops. If you hop between multiple computers and want to keep a common set of packages and configuration across all of them then Nix is the best tool I've seen for this job.

Muaahaa
Автор

man really made the video 13:37 and thought nobody would notice

MilitaryCoverUp
Автор

NixOS is pretty great, and it only takes you about 2 years worth of weekends for you to be pretty happy with your setup.

KronikAlkoholik
Автор

There are ways to lean into or out from "double configuration" in Nix. Some of it can be necessary or at least advantageous because of how PATH is handled on a Nix-based system, but you have a lot of control. With my Nix dotfiles I generally opt to keep my non-nix configurations in their normal filetypes, and just use Nix to copy them to the correct place in my file system.

Muaahaa
Автор

Ive always struggled hard with prebuilt neovim distributions. After trying out nixvim, I got to an amazing neovim setup that just feels right and better than everything I've ever used within a day. The configuration is so extrmely straightforward and simple. Nix and NixOS are truly prime.

ViperLarry-vp
Автор

Been full timing NixOS for over a year and love it.

mikekellytech
Автор

> "Finding a computer with nix will be the hard part..."
The statically linked binary for nix is 40mb or so and runs in user space if you want to manage only a few things (which I do for my work Mac). I installed it on my work mac with no issues with my nvim config. It replaced brew for me as my goto package manager for Mac since I can share configs with my home Linux computers.

The hardest barrier to entry for Nix is the config language. I would never recommend Nix to the average user, but it's really the best package manager for anyone with technical chops (or linux distro if you go NixOS).

thehungryhippy
Автор

Comparing nix to arch is like comparing Haskell to C 😂

fsouza
Автор

Actually you don't necessarily double configure, often you could also just passt the config file directly.
But the advantage I see of the abstraction is you could hide more than one config behind an option e.g. reverse proxy for a webservice or you could keep the naming if there is a slight change in config like sometimes different capitalization

Kabbone
Автор

I really appreciate that you even include them listing their sponsors

joshualetcher
Автор

5:35 Yeah, I completely agree. All the configuration in one line arguments sound nice until you have to do something non-trivial for which there's no "one-line toggle" yet. And if you dare to look under the hood of these "config machines" to fix a couple parts - it's almost always 10x more complex than if you'd set up everything manually. Same thing applies for other (n)vim distributions, not only nixvim.

dolorsitametblue
Автор

The big advantage for me of doing it this way is how it integrates with my overall nixos setup. I have a single repo which defines the configuration for several machines, and this allows me not only to pull in all plugins and configurations automatically when I add a new system, without even having to specially take care of neovim itself, but also to just override specific parts of it on certain systems if needed, without having to maintain several versions of the overall neovim config.

sharperguy
Автор

I'm wholly opposed to Nix-lang configurations. Just revision control your dot files in the same directory as your .nix files and you'll have a lot less to worry about in the long run.

WHYUNODYLAN
Автор

To your point Prime.
Ansible is repeatable, so you can run the same commands again and again with the same input. However it does not guarantee the same output.
If you use Nix with Flakes that has a lockfile of all deps, nix is repeatable and here is the important part, re-producible.

Ansible can repeat the same commands over and over again, however if one of those commands uses say, apt-get update, you cannot guarantee you get the same as you ran last time. This is a large part of what the nix ecosystem helps solve.

henrikstanleymortensen
Автор

my setup is to COPY a raw lua file into the config folder upon activationScript that way i can change things fast and if i like it i can copy the file back to the repo and push er up

BLUYES