Nix and NeoVim

Nix and NeoVim

ThePrimeTime

10 месяцев назад

161,315 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@adammontgomery7980
@adammontgomery7980 - 25.11.2024 20:06

"It's reproducible!!" Sure, but you can also just pull a config from a git repo and reproduce your config on any machine. I'm weirded out by technology cults.

Ответить
@jhg12989
@jhg12989 - 17.11.2024 20:16

Not having to also manage the installations of the various language servers is one of the killer features.

Ответить
@notanenglishperson9865
@notanenglishperson9865 - 30.10.2024 22:55

I don't think that rerpducability is a good enough reason. After all, you can't reproduce things like drivers, they won't be compatible with another computer, also the package manager is limited on packages, so what's the point

Ответить
@myselfakashagarwal
@myselfakashagarwal - 11.10.2024 18:47

Lol just run the neovim containerised good bye config BS

Ответить
@LuisCassih
@LuisCassih - 09.10.2024 02:57

You taken this from a wrong perspective, nix is not double configuration, is just having a common languague for predefined requisites/configurations of software. That's said, I kinda agree with your point on this nixvim, because of their addition of a config layer (even thou you can use it for simple configs and just move lua files for the complex ones xD), but as the others said, you can just have a regular neovim package and move over your lua folder.
People already do something similar with a dotfiles with install scripts and stow or any other tool for copying files into a new installment. Nix solves this, and instead of having these configs scattered, you just have them inside nix, is just moving folder from one part to another.
I'm instered in nix not only for reproducibility, but also for the layer of separation of dependencies, knowing that I can update packages without breaking others. I know that appImages want to solve this, but is not good enough.

Ответить
@einargs
@einargs - 08.09.2024 10:52

Ive been using nixos for five years and just started neovim (after using vim for five years). I can't believe i hadn't heard of this.

Ответить
@samucancld
@samucancld - 30.08.2024 16:37

L take, developing in docker is the best

Ответить
@mechan1sm_
@mechan1sm_ - 25.08.2024 12:28

2024 is not the year of Rust or Zig
it is definitely the year of Nix and nix package manager

it can be installed everywhere: linux, windows, macos, android, github CI/CD

and can be used for so many things:
declare your home environment, declare all the environments for your dev projects manage all your home devices, doing CI/CD/Docker, etc.

all you need to know is just this particular language

Ответить
@user-eg6nq7qt8c
@user-eg6nq7qt8c - 23.08.2024 19:03

gramma smokin' with the windows up. Classic trauma.

Ответить
@quickdudley
@quickdudley - 14.08.2024 00:32

My approach was to just move my ~/.config/nvim/* etc into my NixOS config git repo and add something to the nix stuff to copy them back.

Ответить
@Joris-KarlHuysmans
@Joris-KarlHuysmans - 07.08.2024 08:57

Nix is an addiction. It’s worst than Arch…be careful.

Ответить
@TwoCenturies
@TwoCenturies - 02.08.2024 06:21

all these comments and not a single person pointing out the leet video length

Ответить
@kissu_io
@kissu_io - 14.07.2024 17:04

Not sure if I should Arch or Nix now. 😒

Ответить
@71Jay17
@71Jay17 - 20.06.2024 10:13

Nix is amazing, long time Windows user just converted. So simple and easy to configure a complete environment and never have to worry about destroying it which is completely contrary to my many other Linux experiences.

sudo nix-rebuild switch.
winning.

Ответить
@Ben_R4mZ
@Ben_R4mZ - 14.06.2024 03:48

I want to give Linux a try/switch completely but the more I learn about Nix the more I both want, and don't want, to start with it and stick with it forever.

Ответить
@TheKillerJin
@TheKillerJin - 09.06.2024 13:56

The guy who commented on the livestream that he uses lua to config his neovim, and then nix to copy it, meant he was using home-manager most likely to just copy the lua files to the .config/nvim directory. He didnt mean he configured his nix environment using lua, afaik.

Ответить
@TheKillerJin
@TheKillerJin - 09.06.2024 13:46

I mean, why not just use home-manager and have all the dotfiles generated/managed by nix?

Ответить
@chriskruining
@chriskruining - 05.06.2024 01:09

I totally get and agree with your arguments on the pain of an abstraction on the abstraction. But I do have a counter argument. Which is that as a nixos user you want to do everything in the nixconfig you can do in the nix config. everything outside of that feels more like a missing feature than a specialization if you catch my drift. In my case I've been running on nixos for one and a half month. and I am also gathering courage to finally start on nvim. so from my perspective it feels waaaay more confortable being able to config nvim from nix. and since I am new in that space I reckon I wont really run into missing features, because I don't know what is available in lua directly.

Ответить
@duartedias271
@duartedias271 - 26.05.2024 14:31

I use NixOS as my only distro and i never do config files in nix, much prefer to use Nix just to copy the config over.

Besides the obvious double config problem. Some nix options dont do what you think they do so you have to go to code source and see.

Ответить
@bobbybyrne1899
@bobbybyrne1899 - 25.04.2024 02:42

All of the negative points prime makes on abstraction layers and learning the new config are true for all of NixOS. NixOS is an abstraction layer on top of linux. Having to relearn the Nix way for every little thing drove me crazy. The NixOS docs (or lack there of) also drove me crazy. The worst though, was if a problem occurred you're now troubleshooting a problem and also an abstraction layer.

Ответить
@ZTGallagher
@ZTGallagher - 16.04.2024 08:14

I always saw nix as a replacement for dev-containers or vagrantboxes.

Ответить
@Rohinthas
@Rohinthas - 13.04.2024 21:56

I'm just here for the Internet Comment Etiquette references... well and also to explore my nix-curiosity... but mostly for Eriks face in the background for like 10s

Ответить
@TrevelyanOO6
@TrevelyanOO6 - 13.04.2024 17:52

I use Nix on macos and am very happy. So much better than homebrew

Ответить
@trejohnson7677
@trejohnson7677 - 07.04.2024 20:33

how many people on planet earth are going to be reaching for nix, neovim, and unable to deal with the 5 minutes 5 neurons overhead of “double configure”.

Ответить
@joewell6435
@joewell6435 - 21.03.2024 02:27

as for finding a computer with nix, not as hard as you might think, without root access, the nix package manager can be installed on pretty much any linux distro (Including WSL), Mac, even android.

Ответить
@e3gh757
@e3gh757 - 20.03.2024 06:54

Here is my problem… just learn vi… as a devops engineer every Linux install has vi… you don’t always have the luxury of installing with open internet access…. I wish I had neovim everywhere, but I don’t…

Ответить
@ZombieLincoln666
@ZombieLincoln666 - 19.03.2024 00:24

I just don’t see a point for most people. Picking a regular distro and using a dotfile manager (like chezmoi) that hosts them on GitHub will give enough consistency.

Ответить
@ismbks
@ismbks - 17.03.2024 12:19

nix feels overkill for most usecases, for a portable dev environment id just use a container, simple and gets the job done

Ответить
@LarsOksendal
@LarsOksendal - 16.03.2024 16:39

I'll donate $100 to you when you get into NixOS, flake, home-manager and set up Neovim your way. Looking forward to that video! 🙌 You can use Lua.

Ответить
@uchennaofoma4624
@uchennaofoma4624 - 12.03.2024 17:29

Been using it for a while now, it's really dope 👌

Ответить
@officialrajdeepsingh
@officialrajdeepsingh - 10.03.2024 18:24

I used nvchad and lazyvim; when I first discovered nixvim, I thought it was a total waste of time, installing and config configuring it took too much time. When However, when I started Nixvim. The experience was amazing.

Ответить
@hayyanhami6826
@hayyanhami6826 - 09.03.2024 20:26

I'm using Stow + Nix for sharing my setup and so far it's really straightforward.
Nix auto installs everything but most of the custom config is happening via stow dotfiles management script I wrote for myself using Makefile.
So literally it's just as easy as a `git clone` `make init` on a fresh system.
And `make sync` for already fetched system.
UPDATE: So far reversing the process seemed much pleasant to me but gotta try nix config too.

Ответить
@thehungryhippy
@thehungryhippy - 08.03.2024 18:51

> "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).

Ответить
@struntuz
@struntuz - 08.03.2024 16:47

I generally write configs in nix as any other distro and just use home manager to copy them, it works very well and keeps reproducibility when using flakes and keeping everything on a git repository. Only cases where i tend to use nix configurations are the very simple ones or when i need some more robust integration with nixos like importing something from the store.

Ответить
@iriolavagno4060
@iriolavagno4060 - 08.03.2024 01:30

not that hard, I have 6 computers with Nix at home🤣

Ответить
@iriolavagno4060
@iriolavagno4060 - 08.03.2024 01:21

Nix is like the Red Pill in Matrix, once you start using it you CAN'T see the world in the same way again :-)

Ответить
@SandroWritesCode
@SandroWritesCode - 05.03.2024 04:55

Is there a link to the source video?

Ответить
@leonardotavaresbrown9779
@leonardotavaresbrown9779 - 04.03.2024 22:53

tbh I find the whole vim ecosystem a lot of busywork. The only reason I got into it is because building it into nix config seems to yield more lasting benefits for the effort

Ответить
@nathanhargreaves7071
@nathanhargreaves7071 - 04.03.2024 00:40

The biggest advantage I see for Nix and the reason I'm learning it only really manifests when applied to the whole system in NixOS. The idea of having an entirely declarative and reproducible operating system and config is very attractive to me.

When I started using Linux in high school I was initially struck by its performance, which quickly led to me falling in love and dumping Windows in the trash. As I learned more about it I discovered my other favorite thing about Linux: freedom.

Suddenly it was possible to create any system I like. Don't like this application? Replace it. Don't like this desktop environment? Replace that, too. Customize everything, find forks, potentially make your own; if you have a dream for a config, you can generally make it happen.

Only theoretically, though. As I began to delve deeper into customizing my system I began encountering the challenges of doing so. Making the changes? Pretty easy. Remembering, "Why did I make this change?" or even, "What have I changed and where?" can become a pretty big issue. The classic solution is to keep documentation but ain't nobody got time for that (especially where the alternative provided below exists) and I have ADHD, so no. Yes, you can hack and modify a Linux system to your heart's content, but when's it gonna break on you? Not only that, but what if you need to wipe and reinstall? Backing up those hundreds or thousands of configuration files and restoring them, potentially between software or OS versions, is tedious at best, usually requiring a decent bit of manual work unless you've written a script for it (hooray tech debt).

This is why Nix and NixOS are so attractive to me. I can spend the next year, two years, five years customizing an entire Linux system declaratively and Nix/NixOS handles making that happen. Include Flakes and Home-Manager and damn near every aspect of my system can be managed this way. This means that if I need to wipe my OS or move to a new machine, I can copy over just a couple dozen (at most) `.nix` files, run `nixos-rebuild switch`, and there you go: there's that system, your system, that you've been working on so long. Nix can even grab remote source from Github and apply patches automatically; what you can configure declaratively in this way is really almost limitless.

This ended up being a lot longer than I expected it to be, but I'm really excited about NixOS right now; I just discovered it last week. For me, putting in the time to learn Nix is more than worth it. Yeah, you've gotta double configure here and there, but the magic of throwing that config onto another machine and having your system's services, users, bootloader, editor, web browser (including extensions and settings), file manager, media player, and everything else, too, installed and configured for you as declared in your config, is a very nice feeling.

Thank you for reading.

Ответить
@mikekellytech
@mikekellytech - 02.03.2024 08:03

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

Ответить
@AminD0
@AminD0 - 29.02.2024 00:23

You can just use your already existing config files and import it in nix instead of writing everything in nix language. So you could combine it.

Ответить
@harrytsang1501
@harrytsang1501 - 28.02.2024 03:15

Development through docker is the best experience there is if you develop CUDA and need to test more than one version

Ответить
@DrewryPope
@DrewryPope - 27.02.2024 17:01

see from nix perspective, nix is The configuration, and the fact that apps and other things have their own configuration is merely an inconvenience, we'd rather you didn't actually, just use nix

Ответить
@alienman5000
@alienman5000 - 26.02.2024 00:29

You don’t necessarily need to configure everything using nix language. With Home Manager you can simple copy your existing dot files

Ответить
@ETBCOR
@ETBCOR - 26.02.2024 00:28

Yo, could you link the original video? Thanks:)

Ответить
@MykolajGuzej
@MykolajGuzej - 25.02.2024 08:15

Dear Prime!
I like to watch your videos.
But I have to say that you are extremely wrong to call a Slavic accent russian. My remark is especially relevant now, especially given that the author of the video you reviewed is a Ukrainian. I hope you understand.
Regards.

Ответить
@MohamedNidabdella
@MohamedNidabdella - 24.02.2024 18:43

The thing I hated when I used nix is lack of documentation…I always ended up copying stuff from other flakes. Nix and python are just a disaster when combined

Ответить