Nix and NeoVim

  Рет қаралды 111,622

ThePrimeTime

ThePrimeTime

3 ай бұрын

Recorded live on twitch, GET IN
/ theprimeagen
Become a backend engineer. Its my favorite site
boot.dev/?promo=PRIMEYT
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
/ theprimeagen
Discord
/ discord
Have something for me to read or react to?: / theprimeagenreact
Kinesis Advantage 360: bit.ly/Prime-Kinesis
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))
turso.tech/deeznuts

Пікірлер: 296
@GaetanLepage
@GaetanLepage 3 ай бұрын
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 :)
@alexthotse5487
@alexthotse5487 3 ай бұрын
LET'S GOOOOOOO!!!!!!
@juangajardo4054
@juangajardo4054 3 ай бұрын
Would love to see something like this! 🔥
@mats852
@mats852 3 ай бұрын
I'd totally watch that!
@aimpizza6823
@aimpizza6823 3 ай бұрын
that'd be awesome
@karim6514
@karim6514 2 ай бұрын
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
@TheD3adlysin
@TheD3adlysin 3 ай бұрын
👉👈 gotta admit guys... I'm a little nix curious uwu
@ardishco
@ardishco 3 ай бұрын
then use it fam
@Redyf
@Redyf 3 ай бұрын
W, join the nix hype!
@AdroSlice
@AdroSlice 3 ай бұрын
I agree, but it feels too much like academic whiteboard masturbation
@darianmorat
@darianmorat 3 ай бұрын
​@@AdroSlice wtf
@rasib101
@rasib101 3 ай бұрын
​@@AdroSlicefor me the config is daunting
@vimjoyer
@vimjoyer 3 ай бұрын
OMG! Thanks Prime!!!
@ricardoislasruiz3186
@ricardoislasruiz3186 3 ай бұрын
You have an awesome channel!
@maksymperepelytsia6032
@maksymperepelytsia6032 3 ай бұрын
Друже, маєш реально файні відео! І нового підписника)
@maninalift
@maninalift 3 ай бұрын
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.
@Edlavvalde
@Edlavvalde 3 ай бұрын
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.
@enderger5308
@enderger5308 3 ай бұрын
@@EdlavvaldeShudders in Electron packaging
@Edlavvalde
@Edlavvalde 3 ай бұрын
@@enderger5308 😥🎻
@creativecraving
@creativecraving 3 ай бұрын
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.
@joewell6435
@joewell6435 2 ай бұрын
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.
@Muaahaa
@Muaahaa 3 ай бұрын
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.
@MilitaryCoverUp
@MilitaryCoverUp 3 ай бұрын
man really made the video 13:37 and thought nobody would notice
@nafuranyleniwiec5885
@nafuranyleniwiec5885 3 ай бұрын
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.
@ZombieLincoln666
@ZombieLincoln666 2 ай бұрын
Seems like it’s kind of overkill for normal individual users.
@wojtekkrupski8583
@wojtekkrupski8583 2 ай бұрын
@@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
@ZombieLincoln666
@ZombieLincoln666 2 ай бұрын
@@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
@Muaahaa
@Muaahaa 3 ай бұрын
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.
@GamerMeiogordo
@GamerMeiogordo 2 ай бұрын
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
@Muaahaa
@Muaahaa 2 ай бұрын
​@@GamerMeiogordoI use home-manager for copying dotfiles to `~/.config`. I personally advise people to start using home-manager sooner than later.
@fsouza
@fsouza 3 ай бұрын
Comparing nix to arch is like comparing Haskell to C 😂
@red13emerald
@red13emerald 2 ай бұрын
Huh, that is actually a pretty good comparison.
@linked3
@linked3 Ай бұрын
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.
@kelvinpina3392
@kelvinpina3392 18 күн бұрын
it is actually good, because it is comparing different approaches, when people think about imperative they think about c, and functional haskell
@BLUYES422
@BLUYES422 3 ай бұрын
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
@haariger_wookie5646
@haariger_wookie5646 3 ай бұрын
“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.
@WHYUNODYLAN
@WHYUNODYLAN 3 ай бұрын
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.
@Kabbone
@Kabbone 3 ай бұрын
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
@janAkaliKilo
@janAkaliKilo 3 ай бұрын
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.
@dustee2680
@dustee2680 3 ай бұрын
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.
@oserodal2702
@oserodal2702 3 ай бұрын
You can literally import your lua config in your nixvim config.
@sharperguy
@sharperguy 3 ай бұрын
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.
@Qohist
@Qohist 3 ай бұрын
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
@Redyf
@Redyf 3 ай бұрын
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 😄
@_Lumiere_
@_Lumiere_ 3 ай бұрын
Do you use it for gaming?
@Qohist
@Qohist 3 ай бұрын
@@_Lumiere_ My laptop isnt very strong but it handles games like Mindustry Minecraft Terraria pretty well
@jamespae7019
@jamespae7019 3 ай бұрын
Same. Simply going back a generation when you inevitably screw something up is really neat.
@sharperguy
@sharperguy 3 ай бұрын
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"
@user-nq9vh7mv7k
@user-nq9vh7mv7k 3 ай бұрын
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.
@michelnielsen2855
@michelnielsen2855 3 ай бұрын
Lol, I just spend some time this week to redo my whole Neovim setup because it was old and I wanted to switch from packer to lazy. However, I am a NixOs user. Wish I had heard about NixVim earlier, but I am probably gonna stick with my lua setup for now. I can highly recommend Nix and NixOs though. All other operating systems seems like stone age tools compared to NixOs. I will not even consider using an operating system if it does not have following features: - declarative reproducible configuration which is easy to copy over to a fresh laptop and get that fresh laptop rolling with all my usual setup. (I don't want to sit and manually `sudo apt-get install` all my favorite tools and packages, I just want to fire off one command and have my system setup as I use to) - easy rollback of upgrades when some update screw something up. - the ability to have the same stuff (libraries etc) installed in multiple versions, such that I never have to worry about breaking something random just because I upgraded spotify or whatever.
@user-xd5gd4pc9h
@user-xd5gd4pc9h 3 ай бұрын
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!
@joshualetcher4743
@joshualetcher4743 3 ай бұрын
I really appreciate that you even include them listing their sponsors
@Nicfallenangel
@Nicfallenangel 3 ай бұрын
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.
@XxZeldaxXXxLinkxX
@XxZeldaxXXxLinkxX 3 ай бұрын
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.
@ppen9u1n
@ppen9u1n 3 ай бұрын
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).
@henrikstanleymortensen4295
@henrikstanleymortensen4295 3 ай бұрын
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.
@BraxtonMeyer
@BraxtonMeyer 3 ай бұрын
friendly reminder prime. Nix just can be installed over top of a MackOS system just like Linux.
@zyansheep
@zyansheep 3 ай бұрын
Can also be installed via WSL!
@BraxtonMeyer
@BraxtonMeyer 3 ай бұрын
@@zyansheep "Windows is a niche os for gaming"
@marcandruu
@marcandruu 3 ай бұрын
Yeah it's just a package manager
@RobertBMenke
@RobertBMenke 3 ай бұрын
Nix integration on mac isn’t the greatest for applications. It’s great for command line stuff and dev envs though.
@zyriab5797
@zyriab5797 3 ай бұрын
Prime runs Pop_OS!
@Powerofthepickle
@Powerofthepickle 3 ай бұрын
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
@enderger5308
@enderger5308 3 ай бұрын
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
@9s-l-s9 3 ай бұрын
The first sentence kinda makes no sense 🤔
@enderger5308
@enderger5308 3 ай бұрын
@@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.
@marcandruu
@marcandruu 3 ай бұрын
Nix is pretty neat, but it's just felt like a hassle trying to do regular work with it
@ardishco
@ardishco 3 ай бұрын
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.
@oserodal2702
@oserodal2702 3 ай бұрын
​@@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.
@guguludugulu
@guguludugulu 3 ай бұрын
@@oserodal2702 Huh. Setting up Jupyter + Python for me amounted to `nix-shell -p jupyter`
@TurtleKwitty
@TurtleKwitty 3 ай бұрын
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
@RegrinderAlert
@RegrinderAlert 3 ай бұрын
@@oserodal2702How so? That should be super straightforward to achieve - I am curious what your pain points turned out to be
@mikekellytech
@mikekellytech 2 ай бұрын
Been full timing NixOS for over a year and love it.
@uchennaofoma4624
@uchennaofoma4624 2 ай бұрын
Been using it for a while now, it's really dope 👌
@thehungryhippy
@thehungryhippy 2 ай бұрын
> "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).
@cptCrax
@cptCrax 3 ай бұрын
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.
@ScibbieGames
@ScibbieGames 3 ай бұрын
Nix and NixOS are older than Debian.
@notanut3686
@notanut3686 3 ай бұрын
​@@ScibbieGames they aren't though
@ppen9u1n
@ppen9u1n 3 ай бұрын
nix was invented by Eelco Dostra for his PhD in 2006, see edolstra.github.io/pubs/phd-thesis.pdf
@ppen9u1n
@ppen9u1n 3 ай бұрын
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.
@TheStickofWar
@TheStickofWar 3 ай бұрын
@@ScibbieGamesDebian came out in the early 90s, Nix came out early 00s
@KronikAlkoholik
@KronikAlkoholik 3 ай бұрын
NixOS is pretty great, and it only takes you about 2 years worth of weekends for you to be pretty happy with your setup.
@androth1502
@androth1502 3 ай бұрын
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.
@trejohnson7677
@trejohnson7677 Ай бұрын
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”.
@struntuz
@struntuz 2 ай бұрын
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.
@abelgerli
@abelgerli 3 ай бұрын
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 !
@Negative_Light
@Negative_Light 3 ай бұрын
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.
@WiecejNoxiego
@WiecejNoxiego 3 ай бұрын
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
@worgenzwithm14z
@worgenzwithm14z 3 ай бұрын
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
@ShaqarudenGames
@ShaqarudenGames 3 ай бұрын
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
@SpaghettiRealm
@SpaghettiRealm 3 ай бұрын
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
@fedayka
@fedayka 3 ай бұрын
Is that node_modules for my text editor? AMAZING!
@pengie_
@pengie_ 3 ай бұрын
I'm so happy prime watched this
@cbaesemanai
@cbaesemanai 3 ай бұрын
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.
@iriolavagno4060
@iriolavagno4060 2 ай бұрын
Nix is like the Red Pill in Matrix, once you start using it you CAN'T see the world in the same way again :-)
@Rohinthas
@Rohinthas Ай бұрын
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
@c_kemper
@c_kemper 3 ай бұрын
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!
@joewell6435
@joewell6435 2 ай бұрын
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.
@Bomag
@Bomag 3 ай бұрын
I'm extremely nix curious too. Be fun to watch you dive into it.
@tonyb3123
@tonyb3123 3 ай бұрын
Nix is great, I highly recommend it The Nix expression language is decidedly terrible, though.
@ETBCOR
@ETBCOR 3 ай бұрын
Yo, could you link the original video? Thanks:)
@hitarthpatel
@hitarthpatel 3 ай бұрын
i use arch BTW , want to switch to nixos but dont have time to do that
@KizukiKotataki
@KizukiKotataki Ай бұрын
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
@themohmand
@themohmand 3 ай бұрын
I have never clicked on a video faster than this!
@wildwestrom
@wildwestrom 3 ай бұрын
How do you get autocomplete for Neovim lua? Last time I used a lua lsp server I couldn't get any information.
@gunstorm05
@gunstorm05 3 ай бұрын
Neodev nvim plugin
@CoinedBeatz
@CoinedBeatz 3 ай бұрын
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.
@ppen9u1n
@ppen9u1n 3 ай бұрын
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.
@FrankJonen
@FrankJonen 3 ай бұрын
Sounds like a case for Apple's new PKL.
@bobbybyrne1899
@bobbybyrne1899 Ай бұрын
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.
@alienman5000
@alienman5000 3 ай бұрын
You don’t necessarily need to configure everything using nix language. With Home Manager you can simple copy your existing dot files
@m4rt_
@m4rt_ 3 ай бұрын
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.
@geryz7549
@geryz7549 3 ай бұрын
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
@clingyking2774
@clingyking2774 3 ай бұрын
Anyone please link thePrimeagen's Neovim config. He has not updated it on his formal github.
@FrancoGasperino
@FrancoGasperino 3 ай бұрын
neovim + docker + clojure + repl all within the docker container is pretty fly.
@corewarrior
@corewarrior 3 ай бұрын
Have you ever made a video on how you configure and use Ansible? If you haven't that might be cool at some point.
@milindchauhan
@milindchauhan 3 ай бұрын
He has a course on frontendmasters called developer productivity or something like that. He goes over ansible there.
@alinagy
@alinagy 3 ай бұрын
how did I just find out about nix, its opening my eyes on new horizons
@Tobsson
@Tobsson 3 ай бұрын
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.
@vaisakhkm783
@vaisakhkm783 3 ай бұрын
Have you got out of insane learning curve?
@alinagy
@alinagy 3 ай бұрын
@@vaisakhkm783 I mess around with it on the weekends, eventually it will be conquered
@user-bi3du7or6e
@user-bi3du7or6e 3 ай бұрын
I want to know about nix syntax design choices
@0xCAFEF00D
@0xCAFEF00D 3 ай бұрын
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.
@dv_xl
@dv_xl 3 ай бұрын
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.
@zyansheep
@zyansheep 3 ай бұрын
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
@NoLoginIdea
@NoLoginIdea 3 ай бұрын
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.
@DimasPangestu-dx7hn
@DimasPangestu-dx7hn 3 ай бұрын
I admire the versatility of the Nix flake ecosystem as it offers an alternative approach to defining dotfiles.
@dustee2680
@dustee2680 3 ай бұрын
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.
@caedis_
@caedis_ 3 ай бұрын
Love Vimjoyer's videos on nix and nixos
@CrazyMineCuber
@CrazyMineCuber 3 ай бұрын
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.
@Muaahaa
@Muaahaa 3 ай бұрын
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.
@lolololo-cx4dp
@lolololo-cx4dp 3 ай бұрын
I literally just use regular nvim configuration and makeoutofstoresymlink lol
@CrazyMineCuber
@CrazyMineCuber 3 ай бұрын
@@lolololo-cx4dp Yes that is the definatelly the way unless you want to make something more comlicated.
@EngineerNick
@EngineerNick 3 ай бұрын
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.
@SandroPadin
@SandroPadin 2 ай бұрын
Is there a link to the source video?
@underflowexception
@underflowexception 3 ай бұрын
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
@user-nq9vh7mv7k
@user-nq9vh7mv7k 3 ай бұрын
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.
@derbibliothekarderbiblioth9052
@derbibliothekarderbiblioth9052 3 ай бұрын
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.
@ivanjermakov
@ivanjermakov 3 ай бұрын
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?
@JChen7
@JChen7 3 ай бұрын
I got upset when I saw a chunk of code in a string in the configs.
@GS12478
@GS12478 3 ай бұрын
Oh i love NixOS and VIMJoyer!
@Sestaak
@Sestaak 3 ай бұрын
Do it, come to the dark side...
@MrSofazocker
@MrSofazocker 3 ай бұрын
Yeah.. why isn't the nix config a Script that also Just Imports configs, why would you have to Copy Paste them into there?
@kmp3e
@kmp3e 3 ай бұрын
Nix + distrobox and new devs can just get a container for whatever project they’re doing in theory
@Devoodie
@Devoodie 3 ай бұрын
You got me into nvim!
@Sw3d15h_F1s4
@Sw3d15h_F1s4 3 ай бұрын
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.
@UnhingedNW
@UnhingedNW 3 ай бұрын
Macintosh mentioned let’s go
@harrytsang1501
@harrytsang1501 3 ай бұрын
Development through docker is the best experience there is if you develop CUDA and need to test more than one version
@thekillingspoon
@thekillingspoon 22 күн бұрын
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.
@harrytsang1501
@harrytsang1501 22 күн бұрын
@@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
@simonedelpopolo
@simonedelpopolo 3 ай бұрын
Harpooooooooon 😂 7:10
@grawlixes
@grawlixes 3 ай бұрын
NixOS is so rad.
@eriklundstedt9469
@eriklundstedt9469 3 ай бұрын
I'd love a nix/guix fork, compatible with the nix repos(or maybe arch based, like a programmable aur-wrapper in lua) but configured in lua(or, for the guix(lisp) enjoyers out there, fennel (fennel is lisp for lua)) Part of the reason is that you wouldn't really have to do that much "inline" stuff as there are so many things that are already configured in lua Tym and wezterm for terminal emulators Awesome for the window manager Xplr for the (terminal) file explorer/manager Nvim for the text editor Hilbish for the user shell These days it seems to be broken, but there's also luakit web-browser And then just stow the files to where they belong or something It's got a pretty large ecosystem of language packages too, with lua-rocks I'd personally use fd instead of find, bat instead of cat(and less), and exa/lsdeluxe instead of ls And im an Emacs user, but that's besides the point
@adjbutler
@adjbutler 3 ай бұрын
NIX NVIM! NNNNNNNNNVIMMMMMMMMMMM!
@ZTGallagher
@ZTGallagher Ай бұрын
I always saw nix as a replacement for dev-containers or vagrantboxes.
@duartedias271
@duartedias271 2 күн бұрын
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.
@theangelofspace155
@theangelofspace155 3 ай бұрын
What about pkl?
@vaisakhkm783
@vaisakhkm783 3 ай бұрын
i don't have double configuration anywhere... i use nix just to manage packages, and for quick and easy devshells... i haven't buy into the fully reproducible part of nix.. all dot files are separate ~/.config folder ... and it's awesome... also😘to flakes...
@MohamedNidabdella
@MohamedNidabdella 3 ай бұрын
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
@railalis
@railalis 3 ай бұрын
I think keeping your neovim config in lua, and then just compiling it as a plugin through nix is probably the easiest way to migrate. Then all you need nix to do is install the lsp plugins and treesitter. I say this without a fully working config though so I mean, kek.
@leonardotavaresbrown9779
@leonardotavaresbrown9779 2 ай бұрын
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
@jagagemo8141
@jagagemo8141 3 ай бұрын
I actually really like Helix's in general, but IT Sec hasn't approved it. But they have approved neovim. Is there a neovim project out there that's actually just literally Helix?
@arshiaa104
@arshiaa104 3 ай бұрын
i use neoVim BTW
@LarsOksendal
@LarsOksendal 2 ай бұрын
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.
@AminD0
@AminD0 2 ай бұрын
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.
Vim vs Emacs | Prime Reacts
15:56
ThePrimeTime
Рет қаралды 129 М.
Nix - The Best Package Manager
13:04
Mental Outlaw
Рет қаралды 143 М.
Uma Ki Super Power To Dekho 😂
00:15
Uma Bai
Рет қаралды 60 МЛН
Did you find it?! 🤔✨✍️ #funnyart
00:11
Artistomg
Рет қаралды 119 МЛН
Cat story: from hate to love! 😻 #cat #cute #kitten
00:40
Stocat
Рет қаралды 8 МЛН
Become A Neovim Kangaroo
6:54
Code to the Moon
Рет қаралды 53 М.
GitHub's Secret Blocks
1:35
Code & Stuff
Рет қаралды 1,6 М.
I Love Neovim But I WONT Use It | Prime Reacts
23:22
ThePrimeTime
Рет қаралды 105 М.
Nix Dev Environments | Declare Your Coding Projects
5:43
Vimjoyer
Рет қаралды 25 М.
NixOS: Everything Everywhere All At Once
15:10
No Boilerplate
Рет қаралды 253 М.
Game Devs Are Drowning In Complication
36:48
ThePrimeTime
Рет қаралды 215 М.
HOW to REALLY learn NixOS
4:49
IogaMaster
Рет қаралды 33 М.
Neovim Is a Waste Of Time, And I LOVE It | Prime Reacts
17:00
ThePrimeTime
Рет қаралды 83 М.
Is NixOS Overrated?
51:33
The Linux Cast
Рет қаралды 11 М.
3D printed Nintendo Switch Game Carousel
0:14
Bambu Lab
Рет қаралды 4,5 МЛН
Fiber kablo
0:15
Elektrik-Elektronik
Рет қаралды 7 МЛН
IPad Pro fix screen
1:01
Tamar DB (mt)
Рет қаралды 7 МЛН