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 :)
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.
nixpkgs has more than 80k packages. Nixpkgs' mkDerivation has wide support for build tools so most of the time packaging is a "it just works TM" experience. I think the non-FHS (ELF patching) issues are the worst offenders.
I keep wanting to get into Nix, but every time I see a video about it, it seems so abstract that I can't evaluate whether it would meet my goals. This one is pretty concrete (thankfully) but since I'm just now learning NeoVim, I need to learn the Lua way to configure it before I try this out, which could take a few years.
most of the issues with NixOS come down to the immutability/FHS non-compliance, there's usally ways to get stuff working, and if all else fails, or if you ivneed a quick and dirty solution you can use something like distrobox to get a mutable, FHS compliant system that integrates nicely into the host system, but of course there's always going to be edge cases that just won't work for a given user's workflow.
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.
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.
@@ZombieLincoln666Who is "normal user"? As programmer I'd say that nix make my work easier. For me, the need to manually configure each machine I work on, or debugging whether an error that “suddenly appeared” in the code does not result from something changing in dependencies like a Docker image or one of the libraries - these are "overkills" for me. Why the hell should I do it if I can use Nix with all its other superpowers? Even if I’m not a "normal user", I still believe that a person with a single PC would benefit from the philosophy of "configure once for entire life", a vast number of stable packages (even in the "unstable" channel), and smaller perks such as hassle-free configuration of Nvidia with Wayland
@@wojtekkrupski8583 normal users only have one or maybe two machines. I also think it’s valuable for people to ‘refresh’ their install / configuration because chances are there is newer software that is of interest. Maybe not for you, but my setup is kind of always evolving
“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.
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.
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.
The comparison is indeed very fitting. Even though both provide an extensive and always up to date repository of packages, one is highly unstable and unsafe (especially the AUR), whilst the other is very stable and literally unbreakable. Funnily enough, Nix is also a purely functional programming language and that's why NixOS is called the purely functional OS by some.
Personal setting up about this. Neovim config based on lazyvim in lua and through xdg to port them to nix. I also use nix/homemanger instead of nixos to just make it work with less frustration. For anyone who is in the same shoe. And I love prime!
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.
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.
The source of the "one-line toggle" as you call it, is usually just a short preset of things you normally do in traditional linux anyway (shell script that creates some directory with permissions, systemd service with some flags, maybe creation of some user or group, etc...). If that module doesnt exist yet then you fall back to the knowledge you would need in a traditional linux anyway and write that module for yourself. Nix syntax should not scare you away, its quite simple and doesnt obstruct you in any way, quite the opposite. When something non-trivial comes up, the difficulty of it doesnt change based on if you are on nix or not.
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.
> "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).
2:55 That‘s interesting. Not a daily linux user, not a dev, just your average schmuck who likes tinkering. Came from Macs, last machine was a 2010 laptop. Slapped NixOS on it from live cd and started playing around. Love it tbh. Now finding out what‘s so special bout vim.
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.
It's sort of a network effect. Nix is still quite niche and so it's common you run into things that not many other people have tried to do and you struggle to get it to work. But as you fix them you start to realize you can actually build it into a module that you can then publish to make it easier for the next person. On other distros you would usually have to write a tutorial but in nix its just "import this and add an enable=true somewhere"
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
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
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.
Nix vim seems neat, but it seems most suiting for people that just want to get their feet wet. As prime said, it's an abstraction on top of and abstraction. Using the neovim provided by nix (home-manager) provides a perfect level of abstraction. You just add the plug-ins you want. The config that you want to add you can do in both your choice of Lua and vim script. One of my favorite things is you can bundle config with a plug-in, so specific config lines are only added if the plugin it's bundled with is installed.
I'd argue it's the other way around. If you use Nix(OS), your goal is to configure your system declaratively. That means that any standalone "package managers" (including those for neovim) are undesirable. The argument "I don't want to worry about plugins I don't want" is based on a misconception, nixvim comes with an empty config per default, and since nix is lazily evaluated, only things that you configure explicitly will end up in your neovim instance. And what's nice is that it's not an all-or-nothing proposition, you can add lua snippets for plugins or options that are not (yet) supported by nixvim. And you can leverage nix config merging behaviour to define global keymaps related to plugins in the same nix file that configures the plugin, so it will only be in effect when you actually import that file in your higher level config. (This allows for experimentation and "switching on/off" config features easily, for your complete system config).
The option I went with is a repo setting up neovim in nix, and then home-manager symlinks to the lua in my repo (using mkOutOfStoreSymlink). Then I can edit the lua directly and re-load it easily without having to re-generate it in nix. For those outside of the nix side of things, you can also write/source complete files in a nix file and the "compiler" will spit that file out for the program to read natively in the folder you specify.
Nobody is talking about how nixvim maintainers have to support configuration for every plugin... This is not healthy inversion of control. Remember what happened to null-ls?
As a user of Nix i strongly agree with prime, I consider this style of config an anti pattern. It just makes config more painful. My nix+neovim config simply states dependencys, and then tells nix to load my config (which is a single file for ease of transport). What nix is really good at is building isolated software independently, and configuring that build process. If you wanted to build a neovim distro and include a bunch of default conf with nix I understand better, but building a nix definition of plugin configs is hard to maintain and likely to bitrot.
So I totally agree in the case where you want one config for everything, but if you want like a per-project nvim config (for some reason) nix would be really good for that usecase
Nix is really cool. I daily drove it at work for a few weeks in WSL2 but sadly when it came to getting LSPs working in NeoVIM I struggled and had to put it away and go back to Fedora so I could get some work done. Nix requires rethinking of how you set anything up
Fedora just work, i can’t remember the last time it breaks i have two machines with fedora also the upgrade is straight forward, but tbh im not using anything fancy since all my development project is inside containers no compiler/runtime or interpreter is installed on my host machine
I’m actually working on something to make getting Guix (a GNU derivative of Nix that uses Scheme for configuration) running much easier. I think we can make something like Neovim distributions for your OS using Nix/Guix (opinionated configurations for your applications by default with the ability to declaratively customise everything). I’m looking to see if I can even use an integrated theming system based on Base16 to generate GTK and QT themes that make the system look coherent.
@@9s-l-s9 Ok, let me try to explain. GNU Guix is a project maintained by the ones who made most of the Linux userspace like Bash, GCC, and Coreutils that is built on the Nix package manager. One of its defining features is its use of the Scheme programming language. I’m working on a project which provides sane configurations for a Guix system (alongside additional support for configuring things not supported by it’s configuration system yet) that should provide a better starting point for desktop users out of the box.
You don't have to double configure. Any time I have a config I might want to share with a non-Nix machine, I just use a regular config file and reference that from the Nix config
once you set it up it's much less hassle than every other distro imo. I've been doing uni projects with NixOS and I really love how I have no interruptions with my workflow when I update my system.
It's been annoying to setup for new projects butonce its setup then magically things are always installed when they need to and such so theres no "run these random commands to install the right dependencies" and it documents dependencies without any worries. That said it can bea bit annoying to need to define that you depend on standard ass system things but then its nice casue it ensures that its checked without arcane errors
I have run nix on production environments, run just as fast as you can. Its cool and it can do amazing things but you will need to increse your team by a factor of 10 to maintain it.
Nix is a brilliant concept. It's nearly identical to Amazon's internal application deployment system (as of a decade ago). I don't know if it's parallel invention or if someone at Amazon couldn't resist spilling the beans because it was just such a useful abstraction. It let us do so many great things like instant rollbacks and the rest of the isolation goodness that you could get via Docker when that came around.
Nix was invented by Eelco Dolstra for/during his PhD thesis (2006, you can find it online). NixOS 0.1 release was in 2003 and it appears to have been "seriously in use" since around 2012 AFAIR.
Nix is a great OS but the Nix the programming language required to program your config is bespoke and a headache.. the documentation isn't the best and there seems to be many ways to do the same thing which is confusing
Nix for projects is a no-brainer... and yeah, I just started using nixvim... it has some issues like not lazy loading plugins, but fix will be in the pipeline at some point. Nix and direnv... best time saver ever once you get your head around it!
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
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”.
I only want neovim for remote dev tasks... I do not want to spend a lifetime making it feel good every time spin up a new raspberry pi zero over wifi. I tried again the other day to set it up and I was really dissapointed with it. "Choose a package manager?" Hekkin flip no, why would it not come built in? This seems like a good option.
Its a nice idea, I just cant find a reason to use it. I only have one Linux comp where I drive Fedora. Usually dont reconfigure it or need to port the conf anywhere. The same goes for nixvim. I have my lua conf on github and dont really need to port the conf anywhere.
also you can write your config in lua, and then just import that text file into Nix, that way you don't have to write it as lua-in-nix. Also, my neovim setup and my dotfiles are in separate directories. The nix flake just builds nvim, and installs plugins, and then my usual init.lua just imports and activates the plugins
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
After using Nix i realized that no other distro & package manager can even come close to it. Its really a next gen OS, im just worried that i wont ever want to work with non-nix systems ever again.
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.
Regarding multiple abstraction levels, I guess the endgame is that each plugin would expose nix options (plugin would have to have it's own flake) inside nix, so you wouldn't have to interact with lua level in any capacity. Nix is pretty nice like that and if the software is already packaged for it you don't get this abstraction stacking on top of each other issue. If it's not though... HF :P
I mostly agree with you. I absolutely love Nix and NixOS, but for dotfiles it is just more of a headache to configure them in any other language than their native one. I still just Nix in order to get reproducible plugin versions though, but for the dotfiles, I just have Nix glue it together with the plugins and them link the files in their normal configuration locations. I think that is the best of both worlds. You can still do some Nix abstraction magic by generating a glue file where necessary. For example, if I want exactly the same configuration on two different hosts, except for the color scheme or something like that, you can make that happen with NIx.
I also almost always prefer to use my package specific DSLs or config langs where they exist. I made my own Nix flake for my Neovim that handles plugins and dependencies (like language servers) and then the rest is still handled by Lua.
nix is one of the small set of linux ideas (immutable OS being the other) that can potentially get me to switch to linux. but i feel that these concepts are still in infancy and need more time to cook.
Nix has actually been around for 20 years, but you wouldn't be able to tell from the state of the documentation. Also, nix doesn't force your OS to be immutable, you can make changes out of the config environment, but it in general is not recommended. I personally would recommend an easier distro to first switch to Linux, but you can of course give it a try. I used Ubuntu for 3 or so years before arch for about 3 years and now I switched to nix a few weeks ago lol. I've had lots of frustrating parts with nixos, but I think I will stick with it.
@@belowaverageplayer717 This entirely depends on the kind of person. If someone has a high amount of motivation, they'll be able to push through the annoyances of something like Nix or Arch. IMO, starting on a "just works" distro can actually be detrimental to their Linux experience because it'll end up getting in their way when they start getting into advanced configuration. I started on Ubuntu, then Manjaro and a few other distros, avoiding Arch like the plague because I kept hearing about how "hard" it was. 6 years I used Linux on "just works" distros, breaking my system, getting frustrated and having to completely wipe my drive. I almost went back to Windows, the only thing that kept me was seeing how bad it had gotten. Then I went to Arch, and it really wasn't that hard. You learn commands, you use them. A couple years later, I tried Nix and haven't looked back, the difficulties are worth it when you don't have to worry about permanently breaking your audio by trying to edit config files manually, or getting an unbootable system because you wanted to try a different kernel. I can play with drivers, get a black screen then go "oops, better roll back and try again" instead of "fuckfuckfuckfuckfuck"
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.
The downside of this is that it does not support lazy loading yet, but there are efforts to implement this. Sometimes it can be tricky to provide raw lua code into the resulting configuration, but overall, this is really amazing.
I got my bike nix in a few files. The best I can use the modul config on my other machines with no problem. Every Linux and Mac machine can use the Nix package manger and therefore use nix flakes for example to a predictable development environment. In Windows just use WSL and the Linux distro you like but even NiOs is a option there. When you want to get out of a vendor lock with Redhat use nix. You can also create docker container with Nix !
That's how i felt exactly 31 days ago then I switched to NixOS. I wanted to go back but I don't wanna mess with arch config again and NixOS is just a breeze. Granted nixos is also annoying to deal with because it has much higher learning curve than arch. Some packages are not even available!!! Like HDSENTINEL. 80k+ packages my ass
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.
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.
I really need to learn how to properly use vim/nvim. I know the basics but I think plugins are what I am missing and understanding how to do that will make my rust development.
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.
I'm happy with using Arch, but I want to try out Nix, since it seems like it would be nice to avoid dependency hell, and it would make it easier to have the same system setup on multiple machines. Though I have heard that it can be a bit annoying when you have to install some software you want, since you have to add it to your config, then reboot.
Small correction: You add software to your config and re*build* (not reboot!), which you can do in the background while using your system as usual. You'll only have to reboot if you install a new WM, Display manager, etc
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.
I'm experimenting with NixOS for the past days and am trying to see how nix would make it work for me. To avoid double configuration and also alleviate the need to port every dotfile over to the nix wrapper I just let nix copy over the exact dotfiles as they were previously. when it comes to theming by variables within the nix configuration or relying on other variables from the config I start to see the benefit of double configuring. Since just setting the config as text and using variable like this, the alternative of double configuring just seems cleaner, but for sure the biggest disadvantage that I encountered so far. I keep on experimenting for sure and eventually switch over since I hate to keep my dotfiles in sync with the "atlassian-bare-repo" approach.
If you use NixOS with Home-manager in a flake based setup, you can just start by moving your dot files to (a subdir of) your flake as-is and write them with HM (home.file.). You can then gradually migrate some or all of them to HM module settings as you please.
Interesting - I take it you tried with nix and ran into problems? I haven't used CUDA myself, so I'm curious what you ran into. Buggy support in nixpkgs, inability to switch versions without a full system rebuild or something? For my own types of projects, I've found development using jetify's Devbox (based on nix devShells) to be much nicer than using Docker containers, due to 1) not needing disk i/o to go through container volume mounts, which slows down some dev workflows a ton, and 2) being able to use my own shell configuration while in a `devbox shell`. However, my personal and work projects are fairly typical web servers and frontends.
@@thekillingspoon Nix OS is not at fault here. It's almost the easiest way to setup Nvidia driver. However, cuda toolkit as a whole is a mess to setup, and it will fall apart if you try to install more than one version. Whereas Docker completely solves this issue with docker images coming from Nvidia directly
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.
just started using nix as my first Linux distro. it's been challenging, but getting away from windows is worth it. I really like it since I basically can't fuck it up, if I do mess something up just reboot and I'm good. the only issue I've had is I accidentally deleted my user from my nixconfig, which made me unable to log in. root password still worked so that's ok. pretty sure there's a setting to prevent this I think.
3:00 And it's new neovim users that'd consider a neovim distribution in the first place. So there's not a lot of ways to choose this rationally. For anyone with their own configuration only a small subset would like to move. Like configuration addicts.
Could you expand on this, please? i'm genuinely curious. Out of all people, i would never expect someone like you to have such an opinion and i really want to understand why is that the case.
I came to the same conclusion after a couple of hours of playing with it. It is a system for people that just want to play the config game all the time.
Can you elaborate on this? I would assume that most Nix users went with it for a specific reason. Personally (as a NixOS user) I don't understand why I need yet another config language but the reproducibility aspect is just pure gold. Considering that my last 3 systems broke during upgrades
@@creadisc6213 NixOS upgrades will f&ck you over just as badly. nixpkgs is a gargantuan mess and there is zero intent to not break things from anyone involved. Anyone that tries to change this just gets crucified for "hating change" or whatever... ironically. Which brings me to why I hold this opinion: the tech is pretty good, but the people around it are an absolute nightmare. We're currently looking to vote on a governance committee. There's exactly one person whose "campaign" involves improving nix as a technology and ecosystem. Everyone else is just droning on endlessly about identity politics and minorities with zero regard for Nix itself. One person wants to implement mandatory whistleblowing. Watch thy neighbours, report them to the authorities. Gee I wonder where I've heard that before. I just want nothing to do with any of them. Life is far too short to willingly put up with people like that. If you were to use Nix/NixOS and NEVER talk to anyone about it, then it would be pretty nice. But chances are, you'll need help at some point. And then you'll regret it.
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
Some time ago I was trying to be smart and installed just nix-package manager on my Debian based distro. Stable distor + package manager with AUR-like repo, the dream. But the issues kept popping up, quickly outweighing the benefits. Back to building Nvim from source.
I disagree with the double-configure problem. You only have to understand how to configure in nix, and nix will configure it for you correctly. It is impossible to misconfigure using nix, because it will not compile when provided with a misconfiguration. Just read the docs for nix, and voila, it just works. The problem only exists for the maintainers of nix, who use nix as an abstraction for existing configurations.
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 :)
LET'S GOOOOOOO!!!!!!
Would love to see something like this!
🔥
I'd totally watch that!
that'd be awesome
I couldn't imagine how nixvim was so easy to work with but please add lazy loading support it looks is kinda slow if you maie fully working nixvim
👉👈 gotta admit guys... I'm a little nix curious uwu
then use it fam
W, join the nix hype!
I agree, but it feels too much like academic whiteboard masturbation
@@AdroSlice wtf
@@AdroSlicefor me the config is daunting
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.
nixpkgs has more than 80k packages. Nixpkgs' mkDerivation has wide support for build tools so most of the time packaging is a "it just works TM" experience.
I think the non-FHS (ELF patching) issues are the worst offenders.
@@EdlavvaldeShudders in Electron packaging
@@enderger5308 😥🎻
I keep wanting to get into Nix, but every time I see a video about it, it seems so abstract that I can't evaluate whether it would meet my goals. This one is pretty concrete (thankfully) but since I'm just now learning NeoVim, I need to learn the Lua way to configure it before I try this out, which could take a few years.
most of the issues with NixOS come down to the immutability/FHS non-compliance, there's usally ways to get stuff working, and if all else fails, or if you ivneed a quick and dirty solution you can use something like distrobox to get a mutable, FHS compliant system that integrates nicely into the host system, but of course there's always going to be edge cases that just won't work for a given user's workflow.
OMG! Thanks Prime!!!
You have an awesome channel!
Друже, маєш реально файні відео! І нового підписника)
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.
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.
Seems like it’s kind of overkill for normal individual users.
@@ZombieLincoln666Who is "normal user"? As programmer I'd say that nix make my work easier. For me, the need to manually configure each machine I work on, or debugging whether an error that “suddenly appeared” in the code does not result from something changing in dependencies like a Docker image or one of the libraries - these are "overkills" for me. Why the hell should I do it if I can use Nix with all its other superpowers?
Even if I’m not a "normal user", I still believe that a person with a single PC would benefit from the philosophy of "configure once for entire life", a vast number of stable packages (even in the "unstable" channel), and smaller perks such as hassle-free configuration of Nvidia with Wayland
@@wojtekkrupski8583 normal users only have one or maybe two machines. I also think it’s valuable for people to ‘refresh’ their install / configuration because chances are there is newer software that is of interest. Maybe not for you, but my setup is kind of always evolving
man really made the video 13:37 and thought nobody would notice
“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.
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.
Do you have some examples? I'd love to do the same myself, at least until I get into home-manager and such, just copying my pre-nixos dotfiles
@@GamerMeiogordoI use home-manager for copying dotfiles to `~/.config`. I personally advise people to start using home-manager sooner than later.
@@GamerMeiogordobuiltins has functions to read a file.
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.
NixOS is pretty great, and it only takes you about 2 years worth of weekends for you to be pretty happy with your setup.
Been full timing NixOS for over a year and love it.
Comparing nix to arch is like comparing Haskell to C 😂
Huh, that is actually a pretty good comparison.
The comparison is indeed very fitting. Even though both provide an extensive and always up to date repository of packages, one is highly unstable and unsafe (especially the AUR), whilst the other is very stable and literally unbreakable. Funnily enough, Nix is also a purely functional programming language and that's why NixOS is called the purely functional OS by some.
it is actually good, because it is comparing different approaches, when people think about imperative they think about c, and functional haskell
Personal setting up about this. Neovim config based on lazyvim in lua and through xdg to port them to nix. I also use nix/homemanger instead of nixos to just make it work with less frustration. For anyone who is in the same shoe. And I love prime!
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.
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.
The source of the "one-line toggle" as you call it, is usually just a short preset of things you normally do in traditional linux anyway (shell script that creates some directory with permissions, systemd service with some flags, maybe creation of some user or group, etc...). If that module doesnt exist yet then you fall back to the knowledge you would need in a traditional linux anyway and write that module for yourself. Nix syntax should not scare you away, its quite simple and doesnt obstruct you in any way, quite the opposite. When something non-trivial comes up, the difficulty of it doesnt change based on if you are on nix or not.
You can literally import your lua config in your nixvim config.
I really appreciate that you even include them listing their sponsors
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.
> "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).
2:55 That‘s interesting. Not a daily linux user, not a dev, just your average schmuck who likes tinkering.
Came from Macs, last machine was a 2010 laptop. Slapped NixOS on it from live cd and started playing around. Love it tbh.
Now finding out what‘s so special bout vim.
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.
Personally i use NixOS as a daily driver and i love it sometimes its pain in the ass but the features are just too good
Agreed, I have no problems with my nvidia drivers in NixOS due to atomic updates. Also even if it breaks after an update, just rollback 😄
Do you use it for gaming?
@@_Lumiere_ My laptop isnt very strong but it handles games like Mindustry Minecraft Terraria pretty well
Same. Simply going back a generation when you inevitably screw something up is really neat.
It's sort of a network effect. Nix is still quite niche and so it's common you run into things that not many other people have tried to do and you struggle to get it to work. But as you fix them you start to realize you can actually build it into a module that you can then publish to make it easier for the next person. On other distros you would usually have to write a tutorial but in nix its just "import this and add an enable=true somewhere"
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
Nix is like the Red Pill in Matrix, once you start using it you CAN'T see the world in the same way again :-)
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
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.
gramma smokin' with the windows up. Classic trauma.
Nix vim seems neat, but it seems most suiting for people that just want to get their feet wet.
As prime said, it's an abstraction on top of and abstraction. Using the neovim provided by nix (home-manager) provides a perfect level of abstraction. You just add the plug-ins you want. The config that you want to add you can do in both your choice of Lua and vim script.
One of my favorite things is you can bundle config with a plug-in, so specific config lines are only added if the plugin it's bundled with is installed.
I'd argue it's the other way around. If you use Nix(OS), your goal is to configure your system declaratively. That means that any standalone "package managers" (including those for neovim) are undesirable. The argument "I don't want to worry about plugins I don't want" is based on a misconception, nixvim comes with an empty config per default, and since nix is lazily evaluated, only things that you configure explicitly will end up in your neovim instance. And what's nice is that it's not an all-or-nothing proposition, you can add lua snippets for plugins or options that are not (yet) supported by nixvim. And you can leverage nix config merging behaviour to define global keymaps related to plugins in the same nix file that configures the plugin, so it will only be in effect when you actually import that file in your higher level config. (This allows for experimentation and "switching on/off" config features easily, for your complete system config).
The option I went with is a repo setting up neovim in nix, and then home-manager symlinks to the lua in my repo (using mkOutOfStoreSymlink). Then I can edit the lua directly and re-load it easily without having to re-generate it in nix. For those outside of the nix side of things, you can also write/source complete files in a nix file and the "compiler" will spit that file out for the program to read natively in the folder you specify.
Nobody is talking about how nixvim maintainers have to support configuration for every plugin... This is not healthy inversion of control. Remember what happened to null-ls?
yeah this seems bad
Ye, I use NixOS but I do not use NixVim for this exact reason, I just disable Mason, but otherwise use a standard lazy.nvim configuration
friendly reminder prime. Nix just can be installed over top of a MackOS system just like Linux.
Can also be installed via WSL!
@@zyansheep "Windows is a niche os for gaming"
Yeah it's just a package manager
Nix integration on mac isn’t the greatest for applications. It’s great for command line stuff and dev envs though.
Prime runs Pop_OS!
As a user of Nix i strongly agree with prime, I consider this style of config an anti pattern. It just makes config more painful.
My nix+neovim config simply states dependencys, and then tells nix to load my config (which is a single file for ease of transport).
What nix is really good at is building isolated software independently, and configuring that build process.
If you wanted to build a neovim distro and include a bunch of default conf with nix I understand better, but building a nix definition of plugin configs is hard to maintain and likely to bitrot.
So I totally agree in the case where you want one config for everything, but if you want like a per-project nvim config (for some reason) nix would be really good for that usecase
Nix is really cool. I daily drove it at work for a few weeks in WSL2 but sadly when it came to getting LSPs working in NeoVIM I struggled and had to put it away and go back to Fedora so I could get some work done. Nix requires rethinking of how you set anything up
Fedora just work, i can’t remember the last time it breaks i have two machines with fedora also the upgrade is straight forward, but tbh im not using anything fancy since all my development project is inside containers no compiler/runtime or interpreter is installed on my host machine
I’m actually working on something to make getting Guix (a GNU derivative of Nix that uses Scheme for configuration) running much easier. I think we can make something like Neovim distributions for your OS using Nix/Guix (opinionated configurations for your applications by default with the ability to declaratively customise everything). I’m looking to see if I can even use an integrated theming system based on Base16 to generate GTK and QT themes that make the system look coherent.
The first sentence kinda makes no sense 🤔
@@9s-l-s9 Ok, let me try to explain. GNU Guix is a project maintained by the ones who made most of the Linux userspace like Bash, GCC, and Coreutils that is built on the Nix package manager. One of its defining features is its use of the Scheme programming language. I’m working on a project which provides sane configurations for a Guix system (alongside additional support for configuring things not supported by it’s configuration system yet) that should provide a better starting point for desktop users out of the box.
You don't have to double configure. Any time I have a config I might want to share with a non-Nix machine, I just use a regular config file and reference that from the Nix config
Not having to also manage the installations of the various language servers is one of the killer features.
Nix is pretty neat, but it's just felt like a hassle trying to do regular work with it
once you set it up it's much less hassle than every other distro imo. I've been doing uni projects with NixOS and I really love how I have no interruptions with my workflow when I update my system.
@@ardishcoI wish that were true, but setting up Jupyter + Python was a nightmare.
On the other hand, NodeJS feels nice out of the box with Nix.
@@oserodal2702 Huh. Setting up Jupyter + Python for me amounted to `nix-shell -p jupyter`
It's been annoying to setup for new projects butonce its setup then magically things are always installed when they need to and such so theres no "run these random commands to install the right dependencies" and it documents dependencies without any worries. That said it can bea bit annoying to need to define that you depend on standard ass system things but then its nice casue it ensures that its checked without arcane errors
@@oserodal2702How so? That should be super straightforward to achieve - I am curious what your pain points turned out to be
Nix is great, I highly recommend it
The Nix expression language is decidedly terrible, though.
I have run nix on production environments, run just as fast as you can. Its cool and it can do amazing things but you will need to increse your team by a factor of 10 to maintain it.
Nix is a brilliant concept. It's nearly identical to Amazon's internal application deployment system (as of a decade ago). I don't know if it's parallel invention or if someone at Amazon couldn't resist spilling the beans because it was just such a useful abstraction. It let us do so many great things like instant rollbacks and the rest of the isolation goodness that you could get via Docker when that came around.
Nix and NixOS are older than Debian.
@@ScibbieGames they aren't though
nix was invented by Eelco Dostra for his PhD in 2006, see edolstra.github.io/pubs/phd-thesis.pdf
Nix was invented by Eelco Dolstra for/during his PhD thesis (2006, you can find it online). NixOS 0.1 release was in 2003 and it appears to have been "seriously in use" since around 2012 AFAIR.
@@ScibbieGamesDebian came out in the early 90s, Nix came out early 00s
Nix is a great OS but the Nix the programming language required to program your config is bespoke and a headache.. the documentation isn't the best and there seems to be many ways to do the same thing which is confusing
Nix for projects is a no-brainer... and yeah, I just started using nixvim... it has some issues like not lazy loading plugins, but fix will be in the pipeline at some point.
Nix and direnv... best time saver ever once you get your head around it!
I admire the versatility of the Nix flake ecosystem as it offers an alternative approach to defining dotfiles.
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
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”.
I only want neovim for remote dev tasks... I do not want to spend a lifetime making it feel good every time spin up a new raspberry pi zero over wifi. I tried again the other day to set it up and I was really dissapointed with it. "Choose a package manager?" Hekkin flip no, why would it not come built in? This seems like a good option.
1:30 it's not developing with docker which is a merit or a burden, it's all about understanding containers.
how did I just find out about nix, its opening my eyes on new horizons
Its a nice idea, I just cant find a reason to use it. I only have one Linux comp where I drive Fedora. Usually dont reconfigure it or need to port the conf anywhere. The same goes for nixvim. I have my lua conf on github and dont really need to port the conf anywhere.
Have you got out of insane learning curve?
@@vaisakh_km I mess around with it on the weekends, eventually it will be conquered
also you can write your config in lua, and then just import that text file into Nix, that way you don't have to write it as lua-in-nix. Also, my neovim setup and my dotfiles are in separate directories. The nix flake just builds nvim, and installs plugins, and then my usual init.lua just imports and activates the plugins
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
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.
After using Nix i realized that no other distro & package manager can even come close to it. Its really a next gen OS, im just worried that i wont ever want to work with non-nix systems ever again.
I got upset when I saw a chunk of code in a string in the configs.
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.
I mean, why not just use home-manager and have all the dotfiles generated/managed by nix?
Regarding multiple abstraction levels, I guess the endgame is that each plugin would expose nix options (plugin would have to have it's own flake) inside nix, so you wouldn't have to interact with lua level in any capacity. Nix is pretty nice like that and if the software is already packaged for it you don't get this abstraction stacking on top of each other issue. If it's not though... HF :P
I have never clicked on a video faster than this!
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.
I mostly agree with you. I absolutely love Nix and NixOS, but for dotfiles it is just more of a headache to configure them in any other language than their native one. I still just Nix in order to get reproducible plugin versions though, but for the dotfiles, I just have Nix glue it together with the plugins and them link the files in their normal configuration locations. I think that is the best of both worlds. You can still do some Nix abstraction magic by generating a glue file where necessary. For example, if I want exactly the same configuration on two different hosts, except for the color scheme or something like that, you can make that happen with NIx.
I also almost always prefer to use my package specific DSLs or config langs where they exist. I made my own Nix flake for my Neovim that handles plugins and dependencies (like language servers) and then the rest is still handled by Lua.
I literally just use regular nvim configuration and makeoutofstoresymlink lol
@@lolololo-cx4dp Yes that is the definatelly the way unless you want to make something more comlicated.
Sounds like a case for Apple's new PKL.
nix is one of the small set of linux ideas (immutable OS being the other) that can potentially get me to switch to linux. but i feel that these concepts are still in infancy and need more time to cook.
Nix has actually been around for 20 years, but you wouldn't be able to tell from the state of the documentation.
Also, nix doesn't force your OS to be immutable, you can make changes out of the config environment, but it in general is not recommended.
I personally would recommend an easier distro to first switch to Linux, but you can of course give it a try. I used Ubuntu for 3 or so years before arch for about 3 years and now I switched to nix a few weeks ago lol. I've had lots of frustrating parts with nixos, but I think I will stick with it.
@@belowaverageplayer717 This entirely depends on the kind of person. If someone has a high amount of motivation, they'll be able to push through the annoyances of something like Nix or Arch. IMO, starting on a "just works" distro can actually be detrimental to their Linux experience because it'll end up getting in their way when they start getting into advanced configuration.
I started on Ubuntu, then Manjaro and a few other distros, avoiding Arch like the plague because I kept hearing about how "hard" it was. 6 years I used Linux on "just works" distros, breaking my system, getting frustrated and having to completely wipe my drive. I almost went back to Windows, the only thing that kept me was seeing how bad it had gotten.
Then I went to Arch, and it really wasn't that hard. You learn commands, you use them. A couple years later, I tried Nix and haven't looked back, the difficulties are worth it when you don't have to worry about permanently breaking your audio by trying to edit config files manually, or getting an unbootable system because you wanted to try a different kernel. I can play with drivers, get a black screen then go "oops, better roll back and try again" instead of "fuckfuckfuckfuckfuck"
neovim + docker + clojure + repl all within the docker container is pretty fly.
I'm extremely nix curious too. Be fun to watch you dive into it.
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.
I'm so happy prime watched this
The downside of this is that it does not support lazy loading yet, but there are efforts to implement this. Sometimes it can be tricky to provide raw lua code into the resulting configuration, but overall, this is really amazing.
I got my bike nix in a few files. The best I can use the modul config on my other machines with no problem.
Every Linux and Mac machine can use the Nix package manger and therefore use nix flakes for example to a predictable development environment. In Windows just use WSL and the Linux distro you like but even NiOs is a option there.
When you want to get out of a vendor lock with Redhat use nix.
You can also create docker container with Nix !
Nix + distrobox and new devs can just get a container for whatever project they’re doing in theory
i use arch BTW , want to switch to nixos but dont have time to do that
That's how i felt exactly 31 days ago then I switched to NixOS. I wanted to go back but I don't wanna mess with arch config again and NixOS is just a breeze.
Granted nixos is also annoying to deal with because it has much higher learning curve than arch. Some packages are not even available!!! Like HDSENTINEL. 80k+ packages my ass
Do it, come to the dark side...
Is that node_modules for my text editor? AMAZING!
Yeah.. why isn't the nix config a Script that also Just Imports configs, why would you have to Copy Paste them into there?
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.
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.
Been using it for a while now, it's really dope 👌
I really need to learn how to properly use vim/nvim. I know the basics but I think plugins are what I am missing and understanding how to do that will make my rust development.
I think if nixvim implements a help feature like neovim but for nixvim everything would be fine, specially if it had the translations and comparisons.
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.
So now instead of configuring nvim, i need to configure nix? No thanks
I'm happy with using Arch, but I want to try out Nix, since it seems like it would be nice to avoid dependency hell, and it would make it easier to have the same system setup on multiple machines. Though I have heard that it can be a bit annoying when you have to install some software you want, since you have to add it to your config, then reboot.
Small correction: You add software to your config and re*build* (not reboot!), which you can do in the background while using your system as usual. You'll only have to reboot if you install a new WM, Display manager, etc
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.
You don’t necessarily need to configure everything using nix language. With Home Manager you can simple copy your existing dot files
I'm experimenting with NixOS for the past days and am trying to see how nix would make it work for me. To avoid double configuration and also alleviate the need to port every dotfile over to the nix wrapper I just let nix copy over the exact dotfiles as they were previously.
when it comes to theming by variables within the nix configuration or relying on other variables from the config I start to see the benefit of double configuring. Since just setting the config as text and using variable like this, the alternative of double configuring just seems cleaner, but for sure the biggest disadvantage that I encountered so far.
I keep on experimenting for sure and eventually switch over since I hate to keep my dotfiles in sync with the "atlassian-bare-repo" approach.
If you use NixOS with Home-manager in a flake based setup, you can just start by moving your dot files to (a subdir of) your flake as-is and write them with HM (home.file.). You can then gradually migrate some or all of them to HM module settings as you please.
Love Vimjoyer's videos on nix and nixos
Nix is waaaay Archier the Arch, duh !
Development through docker is the best experience there is if you develop CUDA and need to test more than one version
Interesting - I take it you tried with nix and ran into problems? I haven't used CUDA myself, so I'm curious what you ran into. Buggy support in nixpkgs, inability to switch versions without a full system rebuild or something?
For my own types of projects, I've found development using jetify's Devbox (based on nix devShells) to be much nicer than using Docker containers, due to 1) not needing disk i/o to go through container volume mounts, which slows down some dev workflows a ton, and 2) being able to use my own shell configuration while in a `devbox shell`. However, my personal and work projects are fairly typical web servers and frontends.
@@thekillingspoon Nix OS is not at fault here. It's almost the easiest way to setup Nvidia driver.
However, cuda toolkit as a whole is a mess to setup, and it will fall apart if you try to install more than one version. Whereas Docker completely solves this issue with docker images coming from Nvidia directly
I always saw nix as a replacement for dev-containers or vagrantboxes.
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.
NixOS is so rad.
Have you ever made a video on how you configure and use Ansible? If you haven't that might be cool at some point.
He has a course on frontendmasters called developer productivity or something like that. He goes over ansible there.
Oh i love NixOS and VIMJoyer!
just started using nix as my first Linux distro. it's been challenging, but getting away from windows is worth it. I really like it since I basically can't fuck it up, if I do mess something up just reboot and I'm good.
the only issue I've had is I accidentally deleted my user from my nixconfig, which made me unable to log in. root password still worked so that's ok. pretty sure there's a setting to prevent this I think.
3:00
And it's new neovim users that'd consider a neovim distribution in the first place. So there's not a lot of ways to choose this rationally. For anyone with their own configuration only a small subset would like to move. Like configuration addicts.
As a former NixOS maintainer and Nix core member, life is too short for Nix. Do yourself a favor and skip it.
Could you expand on this, please? i'm genuinely curious. Out of all people, i would never expect someone like you to have such an opinion and i really want to understand why is that the case.
I came to the same conclusion after a couple of hours of playing with it. It is a system for people that just want to play the config game all the time.
Can you elaborate on this? I would assume that most Nix users went with it for a specific reason.
Personally (as a NixOS user) I don't understand why I need yet another config language but the reproducibility aspect is just pure gold. Considering that my last 3 systems broke during upgrades
@@creadisc6213it is mostly the learning curve I think
@@creadisc6213 NixOS upgrades will f&ck you over just as badly. nixpkgs is a gargantuan mess and there is zero intent to not break things from anyone involved. Anyone that tries to change this just gets crucified for "hating change" or whatever... ironically.
Which brings me to why I hold this opinion: the tech is pretty good, but the people around it are an absolute nightmare. We're currently looking to vote on a governance committee. There's exactly one person whose "campaign" involves improving nix as a technology and ecosystem. Everyone else is just droning on endlessly about identity politics and minorities with zero regard for Nix itself. One person wants to implement mandatory whistleblowing. Watch thy neighbours, report them to the authorities. Gee I wonder where I've heard that before.
I just want nothing to do with any of them. Life is far too short to willingly put up with people like that.
If you were to use Nix/NixOS and NEVER talk to anyone about it, then it would be pretty nice. But chances are, you'll need help at some point. And then you'll regret it.
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
Nix is an addiction. It’s worst than Arch…be careful.
Some time ago I was trying to be smart and installed just nix-package manager on my Debian based distro. Stable distor + package manager with AUR-like repo, the dream.
But the issues kept popping up, quickly outweighing the benefits. Back to building Nvim from source.
Tried installing nixvim, accidentally joined NXIVM
I disagree with the double-configure problem. You only have to understand how to configure in nix, and nix will configure it for you correctly. It is impossible to misconfigure using nix, because it will not compile when provided with a misconfiguration. Just read the docs for nix, and voila, it just works. The problem only exists for the maintainers of nix, who use nix as an abstraction for existing configurations.
God nixos is exactly what i want but can't go thru the pain and fick my work schedule completely