Nix and NeoVim

Поділитися
Вставка
  • Опубліковано 17 лют 2024
  • 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
  • Наука та технологія

КОМЕНТАРІ • 303

  • @TheD3adlysin
    @TheD3adlysin 4 місяці тому +470

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

    • @ardishco
      @ardishco 4 місяці тому +12

      then use it fam

    • @Redyf
      @Redyf 4 місяці тому +11

      W, join the nix hype!

    • @AdroSlice
      @AdroSlice 4 місяці тому +18

      I agree, but it feels too much like academic whiteboard masturbation

    • @darianmorat
      @darianmorat 4 місяці тому +1

      ​@@AdroSlice wtf

    • @rasib101
      @rasib101 4 місяці тому +1

      ​@@AdroSlicefor me the config is daunting

  • @GaetanLepage
    @GaetanLepage 4 місяці тому +437

    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 4 місяці тому +3

      LET'S GOOOOOOO!!!!!!

    • @juangajardo4054
      @juangajardo4054 4 місяці тому +3

      Would love to see something like this!
      🔥

    • @mats852
      @mats852 3 місяці тому +2

      I'd totally watch that!

    • @aimpizza6823
      @aimpizza6823 3 місяці тому +1

      that'd be awesome

    • @karim6514
      @karim6514 3 місяці тому +1

      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

  • @vimjoyer
    @vimjoyer 4 місяці тому +223

    OMG! Thanks Prime!!!

    • @ricardoislasruiz3186
      @ricardoislasruiz3186 4 місяці тому +7

      You have an awesome channel!

    • @maksymperepelytsia6032
      @maksymperepelytsia6032 3 місяці тому +9

      Друже, маєш реально файні відео! І нового підписника)

  • @maninalift
    @maninalift 4 місяці тому +83

    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 4 місяці тому +13

      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 4 місяці тому +1

      @@EdlavvaldeShudders in Electron packaging

    • @Edlavvalde
      @Edlavvalde 4 місяці тому

      @@enderger5308 😥🎻

    • @creativecraving
      @creativecraving 4 місяці тому +5

      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 3 місяці тому +1

      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 4 місяці тому +63

    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.

  • @nafuranyleniwiec5885
    @nafuranyleniwiec5885 4 місяці тому +18

    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 3 місяці тому

      Seems like it’s kind of overkill for normal individual users.

    • @wojtekkrupski8583
      @wojtekkrupski8583 3 місяці тому +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

  • @fsouza
    @fsouza 4 місяці тому +32

    Comparing nix to arch is like comparing Haskell to C 😂

    • @red13emerald
      @red13emerald 3 місяці тому +6

      Huh, that is actually a pretty good comparison.

    • @linked3
      @linked3 2 місяці тому

      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 Місяць тому

      it is actually good, because it is comparing different approaches, when people think about imperative they think about c, and functional haskell

  • @MilitaryCoverUp
    @MilitaryCoverUp 3 місяці тому +12

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

  • @Muaahaa
    @Muaahaa 4 місяці тому +27

    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 3 місяці тому +1

      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 3 місяці тому

      ​@@GamerMeiogordoI use home-manager for copying dotfiles to `~/.config`. I personally advise people to start using home-manager sooner than later.

  • @haariger_wookie5646
    @haariger_wookie5646 4 місяці тому +12

    “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.

  • @user-nq9vh7mv7k
    @user-nq9vh7mv7k 4 місяці тому +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.

  • @Kabbone
    @Kabbone 4 місяці тому +11

    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

  • @sharperguy
    @sharperguy 4 місяці тому +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.

  • @BLUYES422
    @BLUYES422 4 місяці тому +5

    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

  • @WHYUNODYLAN
    @WHYUNODYLAN 4 місяці тому +5

    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.

  • @joshualetcher4743
    @joshualetcher4743 3 місяці тому +3

    I really appreciate that you even include them listing their sponsors

  • @Nicfallenangel
    @Nicfallenangel 4 місяці тому +1

    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.

  • @user-xd5gd4pc9h
    @user-xd5gd4pc9h 4 місяці тому +6

    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!

  • @Qohist
    @Qohist 4 місяці тому +38

    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 4 місяці тому +1

      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_ 4 місяці тому

      Do you use it for gaming?

    • @Qohist
      @Qohist 4 місяці тому +3

      @@_Lumiere_ My laptop isnt very strong but it handles games like Mindustry Minecraft Terraria pretty well

    • @jamespae7019
      @jamespae7019 4 місяці тому

      Same. Simply going back a generation when you inevitably screw something up is really neat.

    • @sharperguy
      @sharperguy 4 місяці тому +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"

  • @janAkaliKilo
    @janAkaliKilo 4 місяці тому +25

    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 4 місяці тому +2

      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 4 місяці тому +10

      You can literally import your lua config in your nixvim config.

  • @Powerofthepickle
    @Powerofthepickle 4 місяці тому +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

  • @XxZeldaxXXxLinkxX
    @XxZeldaxXXxLinkxX 4 місяці тому +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 4 місяці тому +1

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

  • @uchennaofoma4624
    @uchennaofoma4624 3 місяці тому

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

  • @ETBCOR
    @ETBCOR 3 місяці тому +1

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

  • @enderger5308
    @enderger5308 4 місяці тому +4

    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 4 місяці тому

      The first sentence kinda makes no sense 🤔

    • @enderger5308
      @enderger5308 4 місяці тому

      @@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.

  • @mikekellytech
    @mikekellytech 3 місяці тому +1

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

  • @struntuz
    @struntuz 3 місяці тому

    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.

  • @fedayka
    @fedayka 4 місяці тому

    Is that node_modules for my text editor? AMAZING!

  • @henrikstanleymortensen4295
    @henrikstanleymortensen4295 4 місяці тому +1

    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.

  • @WiecejNoxiego
    @WiecejNoxiego 4 місяці тому

    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 4 місяці тому +1

    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 4 місяці тому

    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

  • @abelgerli
    @abelgerli 4 місяці тому

    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 !

  • @pengie_
    @pengie_ 4 місяці тому

    I'm so happy prime watched this

  • @Negative_Light
    @Negative_Light 4 місяці тому

    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.

  • @thehungryhippy
    @thehungryhippy 3 місяці тому

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

  • @BraxtonMeyer
    @BraxtonMeyer 4 місяці тому +27

    friendly reminder prime. Nix just can be installed over top of a MackOS system just like Linux.

    • @zyansheep
      @zyansheep 4 місяці тому +2

      Can also be installed via WSL!

    • @BraxtonMeyer
      @BraxtonMeyer 4 місяці тому +16

      @@zyansheep "Windows is a niche os for gaming"

    • @marcandruu
      @marcandruu 4 місяці тому

      Yeah it's just a package manager

    • @RobertBMenke
      @RobertBMenke 4 місяці тому

      Nix integration on mac isn’t the greatest for applications. It’s great for command line stuff and dev envs though.

    • @zyriab5797
      @zyriab5797 4 місяці тому

      Prime runs Pop_OS!

  • @chriskruining
    @chriskruining 15 днів тому

    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.

  • @cbaesemanai
    @cbaesemanai 4 місяці тому +1

    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.

  • @SandroPadin
    @SandroPadin 3 місяці тому

    Is there a link to the source video?

  • @corewarrior
    @corewarrior 4 місяці тому

    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 4 місяці тому +1

      He has a course on frontendmasters called developer productivity or something like that. He goes over ansible there.

  • @KronikAlkoholik
    @KronikAlkoholik 3 місяці тому +1

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

  • @marcandruu
    @marcandruu 4 місяці тому +8

    Nix is pretty neat, but it's just felt like a hassle trying to do regular work with it

    • @ardishco
      @ardishco 4 місяці тому +8

      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 4 місяці тому +2

      ​@@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 4 місяці тому

      @@oserodal2702 Huh. Setting up Jupyter + Python for me amounted to `nix-shell -p jupyter`

    • @TurtleKwitty
      @TurtleKwitty 4 місяці тому +1

      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 4 місяці тому

      @@oserodal2702How so? That should be super straightforward to achieve - I am curious what your pain points turned out to be

  • @m4rt_
    @m4rt_ 4 місяці тому

    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 4 місяці тому

      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

  • @Rohinthas
    @Rohinthas 2 місяці тому

    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

  • @themohmand
    @themohmand 4 місяці тому +2

    I have never clicked on a video faster than this!

  • @cptCrax
    @cptCrax 4 місяці тому +4

    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 4 місяці тому

      Nix and NixOS are older than Debian.

    • @notanut3686
      @notanut3686 4 місяці тому

      ​@@ScibbieGames they aren't though

    • @ppen9u1n
      @ppen9u1n 4 місяці тому

      nix was invented by Eelco Dostra for his PhD in 2006, see edolstra.github.io/pubs/phd-thesis.pdf

    • @ppen9u1n
      @ppen9u1n 4 місяці тому

      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 4 місяці тому

      @@ScibbieGamesDebian came out in the early 90s, Nix came out early 00s

  • @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

  • @Bomag
    @Bomag 4 місяці тому

    I'm extremely nix curious too. Be fun to watch you dive into it.

  • @NoLoginIdea
    @NoLoginIdea 4 місяці тому

    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.

  • @CoinedBeatz
    @CoinedBeatz 4 місяці тому

    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 4 місяці тому

      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.

  • @c_kemper
    @c_kemper 4 місяці тому +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 3 місяці тому

    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.

  • @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

  • @iriolavagno4060
    @iriolavagno4060 3 місяці тому +1

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

  • @clingyking2774
    @clingyking2774 4 місяці тому

    Anyone please link thePrimeagen's Neovim config. He has not updated it on his formal github.

  • @dustee2680
    @dustee2680 4 місяці тому +2

    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.

  • @user-bi3du7or6e
    @user-bi3du7or6e 4 місяці тому +1

    I want to know about nix syntax design choices

  • @FrancoGasperino
    @FrancoGasperino 4 місяці тому

    neovim + docker + clojure + repl all within the docker container is pretty fly.

  • @hitarthpatel
    @hitarthpatel 4 місяці тому +4

    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

  • @underflowexception
    @underflowexception 4 місяці тому +2

    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

  • @derbibliothekarderbiblioth9052
    @derbibliothekarderbiblioth9052 4 місяці тому

    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.

  • @nadtz
    @nadtz 4 місяці тому

    After I get my proxmox server rebuilt one of the OS's I want to play around with is NixOS, sounds like this might be another one to add to the list to play with as well since I've been training myself to 'relearn' vi/vim/nvim.

  • @androth1502
    @androth1502 3 місяці тому +1

    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.

    • @belowaverageplayer717
      @belowaverageplayer717 21 день тому

      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.

  • @caedis_
    @caedis_ 4 місяці тому

    Love Vimjoyer's videos on nix and nixos

  • @MrSofazocker
    @MrSofazocker 4 місяці тому +2

    Yeah.. why isn't the nix config a Script that also Just Imports configs, why would you have to Copy Paste them into there?

  • @jagagemo8141
    @jagagemo8141 4 місяці тому

    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?

  • @FrankJonen
    @FrankJonen 4 місяці тому +1

    Sounds like a case for Apple's new PKL.

  • @tonyb3123
    @tonyb3123 4 місяці тому +4

    Nix is great, I highly recommend it
    The Nix expression language is decidedly terrible, though.

  • @JChen7
    @JChen7 4 місяці тому +1

    I got upset when I saw a chunk of code in a string in the configs.

  • @trejohnson7677
    @trejohnson7677 2 місяці тому

    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”.

  • @Ben_R4mZ
    @Ben_R4mZ 6 днів тому

    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.

  • @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.

  • @Devoodie
    @Devoodie 4 місяці тому

    You got me into nvim!

  • @GS12478
    @GS12478 4 місяці тому

    Oh i love NixOS and VIMJoyer!

  • @CrazyMineCuber
    @CrazyMineCuber 4 місяці тому +6

    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 4 місяці тому

      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 4 місяці тому

      I literally just use regular nvim configuration and makeoutofstoresymlink lol

    • @CrazyMineCuber
      @CrazyMineCuber 4 місяці тому

      @@lolololo-cx4dp Yes that is the definatelly the way unless you want to make something more comlicated.

  • @kmp3e
    @kmp3e 4 місяці тому

    Nix + distrobox and new devs can just get a container for whatever project they’re doing in theory

  • @EngineerNick
    @EngineerNick 4 місяці тому +1

    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.

  • @DimasPangestu-dx7hn
    @DimasPangestu-dx7hn 4 місяці тому

    I admire the versatility of the Nix flake ecosystem as it offers an alternative approach to defining dotfiles.

  • @alinagy
    @alinagy 4 місяці тому +5

    how did I just find out about nix, its opening my eyes on new horizons

    • @Tobsson
      @Tobsson 4 місяці тому

      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 4 місяці тому

      Have you got out of insane learning curve?

    • @alinagy
      @alinagy 4 місяці тому

      @@vaisakhkm783 I mess around with it on the weekends, eventually it will be conquered

  • @Sestaak
    @Sestaak 4 місяці тому +2

    Do it, come to the dark side...

  • @UnhingedNW
    @UnhingedNW 4 місяці тому

    Macintosh mentioned let’s go

  • @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.

  • @0xCAFEF00D
    @0xCAFEF00D 4 місяці тому

    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 4 місяці тому +1

    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 4 місяці тому

      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

  • @eriklundstedt9469
    @eriklundstedt9469 4 місяці тому

    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

  • @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 Місяць тому

      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 Місяць тому

      @@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

  • @theangelofspace155
    @theangelofspace155 4 місяці тому

    What about pkl?

  • @vaisakhkm783
    @vaisakhkm783 4 місяці тому

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

  • @TheKillerJin
    @TheKillerJin 11 днів тому

    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.

  • @grawlixes
    @grawlixes 4 місяці тому +1

    NixOS is so rad.

  • @duartedias271
    @duartedias271 24 дні тому

    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.

  • @adjbutler
    @adjbutler 4 місяці тому +2

    NIX NVIM! NNNNNNNNNVIMMMMMMMMMMM!

  • @simonedelpopolo
    @simonedelpopolo 4 місяці тому +1

    Harpooooooooon 😂 7:10

  • @ZTGallagher
    @ZTGallagher 2 місяці тому

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

  • @AminD0
    @AminD0 3 місяці тому

    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.

  • @TheKillerJin
    @TheKillerJin 11 днів тому

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

  • @chopseh
    @chopseh 4 місяці тому

    Nice video length.

  • @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.

  • @Sindoku
    @Sindoku 4 місяці тому

    Nix is awesome