Nixvim: Neovim Distro Powered By Nix

  Рет қаралды 21,611

Vimjoyer

Vimjoyer

Күн бұрын

Discord server: / discord
Donations: ko-fi.com/vimjoyer
All code blocks from the video: github.com/vimjoyer/nixvim-video
nixvim docs: nix-community.github.io/nixvim/
previous nix + neovim video: • Neovim and Nix home-ma...

Пікірлер: 85
@GaetanLepage
@GaetanLepage 5 ай бұрын
Thank you so much for presenting this project so clearly and efficiently ! Your videos are always amazing to watch :)
@yoshiyahoo1552
@yoshiyahoo1552 5 ай бұрын
The primagen needs to see this
@sachinchaudhary1310
@sachinchaudhary1310 Ай бұрын
he did
@IamPyu-v
@IamPyu-v 29 күн бұрын
@@sachinchaudhary1310 Not before this the comment your replying to ;-;
@sachinchaudhary1310
@sachinchaudhary1310 28 күн бұрын
@@IamPyu-v i know
@aloneer0529
@aloneer0529 5 ай бұрын
Your videos are extremely helpful! They helped me with my NixOS config!
@ardishco
@ardishco 5 ай бұрын
Happy to see you in the comment section Alxhr0
@Redyf
@Redyf 5 ай бұрын
YES, I've been making my own config for 5 days now. Nixvim is amazing, also thank you for making this video!
@Aditya-ny8ur
@Aditya-ny8ur 5 ай бұрын
Thank you very much for the video
@Chandramumta
@Chandramumta 5 ай бұрын
Hi, mighty Vimjoyer. Could you make a video about wine, bottles and other staff in NixOS? I am trying to set them up for a month now and they don`t work for me at all.
@TheMattSturgeon
@TheMattSturgeon 5 ай бұрын
Was wondering when you'd find nixvim 🎉🎉
@ThibautLamadon
@ThibautLamadon 5 ай бұрын
love nixvim!
@_modiX
@_modiX 5 ай бұрын
I maintain my own vim configuration on top of NvChad, but oh boi, this is just magic, wow.
@astronemir
@astronemir 4 ай бұрын
Awesome, thanks
@caedis_
@caedis_ 5 ай бұрын
Any thoughts on creating a video on nixos impermanence via tmpfs as root or restoring root as an empty zfs/btrfs snapshots?
@CEOofGameDev
@CEOofGameDev 5 ай бұрын
its nix all the way down...
@eli1882
@eli1882 5 ай бұрын
You misunderstand nix.
@Official_R_deep
@Official_R_deep 5 ай бұрын
I'm configure neovim with nvchad. When I decide to use nixvim. I'm thing it is big mistake but after try three to five day. I'm very happy about it. But best part configuration. It come with lot of configuration. For nixos user I recommend use nixvim.
@Muaahaa
@Muaahaa 5 ай бұрын
I think this is a cool approach, but I prefer to keep as much in Lua as I can, except for installing plugins and their dependencies which I do in Nix. With Lua, I'm still working with codified configuration which is the important part for me, but I still get the advantage of having a more idiomatic nvim config.
@GekoPoiss
@GekoPoiss 5 ай бұрын
You can just include Lua files in your Nix config.
@Muaahaa
@Muaahaa 5 ай бұрын
​@@GekoPoissYup, that is what I do. My neovim config can be run as a flake and isn't tied to any nix frameworks or libraries. Just some wrapNeovimUnstable neovim-unwrapped... The Lua is structured more or less like a standard nvim config (although I've rolled my own plugin manager that sets up plugins, but does not install them since I've got nix doing this).
@GekoPoiss
@GekoPoiss 5 ай бұрын
Nice - next step is to use a decent editor, like Emacs :) @@Muaahaa
@JonnyIrwin
@JonnyIrwin 5 ай бұрын
Thanks for this! I recently setup my Neovim config in nixvim & while it largely works well, I’m undecided whether I want to use this or use a pure Lua config. I’ve had issues with things like getting option autocompletion working with the nixd LSP server. I’ve looked through source code and not sure if it is correct in nixvim, or my version of nixd is too old…or whether I just don’t yet know enough to set it up correctly.
@vimjoyer
@vimjoyer 5 ай бұрын
Nixd is a bit hard to setup, I recommend nil_ls which mostly "just works". I'll make a video about most major nix LSPs later
@JonnyIrwin
@JonnyIrwin 5 ай бұрын
@@vimjoyer I’ve switched to nil_ls. It was just the prospect of option completion that made nixd attractive.
@IndigoVFX
@IndigoVFX 5 ай бұрын
@@vimjoyeryet nixd actually uses nix to evaluate and parse the code you write as opposed to sitting on top of another parser… at least that’s the way I read it when I compared, though I might be mistaken. On my NixOS setup I have it working with Helix but have yet to try it with Nixvim 🤔
@mahmoodsagharjooghi
@mahmoodsagharjooghi 4 ай бұрын
This is super interesting! Thanks! ❤❤ I was wondering how do you make those nice code transition effects? 🤔
@vimjoyer
@vimjoyer 4 ай бұрын
software is called `motion canvas`
@mahmoodsagharjooghi
@mahmoodsagharjooghi 4 ай бұрын
Thanks! Appreciate it! 🫶
@Redyf
@Redyf 5 ай бұрын
Can you make a video about declarative disk partitioning and formatting with Disko?
@kokomema
@kokomema 5 ай бұрын
It would be great to compare two interesting text editors, Emacs and Helix. Both are modular, extensible and oriented towards user customization
@ElGnomistico
@ElGnomistico 5 ай бұрын
Helix not so much so, it's whole motto is to be "batteries included" and to come with somewhat sensible defaults so at least for now it isn't very extensible or customizable.
@Redyf
@Redyf 5 ай бұрын
Neovim better​@@ElGnomistico
@TheSast
@TheSast 5 ай бұрын
Is it possible to use it together with other distros (specifically the ones that are just handled as lua plugins)?
@vimjoyer
@vimjoyer 5 ай бұрын
You can use them separately, but I don't think there's a way to integrate them together.
@daddyDangle
@daddyDangle 5 ай бұрын
Please do a collab with @Primeagen and @TJ
@lennyescott
@lennyescott 5 ай бұрын
would it be possible to configure nixvim's colorscheme with nix-colors? I saw in the colorschemes "base16", so maybe it could be possible? Thanks
@vimjoyer
@vimjoyer 5 ай бұрын
Sure, you can interpolate colors into highlight groups.
@harshilbhatt1556
@harshilbhatt1556 4 ай бұрын
How do you manage multiple flakes? Are they concatenated into 1 file or is there a better way to do this?
@vimjoyer
@vimjoyer 4 ай бұрын
Flakes can import other flakes with web or filesystem urls, but you can include as many projects in one flake as you want. It all depends on your specific use case.
@harshilbhatt1556
@harshilbhatt1556 4 ай бұрын
So would you run a nixvim flake for each project, or modify the "global" flake at /etc/nixos in this case
@slim5782
@slim5782 5 ай бұрын
How did you get the mapleader to space? It's still bound to next character in my normal mode.
@vimjoyer
@vimjoyer 5 ай бұрын
globals.mapleader = " "; Works in an empty setup without anything else, just tested.
@slim5782
@slim5782 5 ай бұрын
Thanks for responding, must be me then. Have a nice day! i'll make a donation @@vimjoyer
@underflowexception
@underflowexception 5 ай бұрын
I've been playing with NixOS over the last day and now I want to be able to pull my dotfiles from git into the OS automatically but I don't know how... can anyone point my in the right direction?
@vimjoyer
@vimjoyer 5 ай бұрын
What do you mean by automatically? You can use git clone or nixos-rebuild --flake to fetch it from GitHub.
@ggorg0
@ggorg0 5 ай бұрын
Kinda late here, but I use Emacs, specifically Doom Emacs because I'm lazy. It has very crappy integration with Nix and I barely managed to get it working using nix-doom-emacs. I'm actually considering switching over to Neovim (maybe also Neovide, the GUI frontend?), but I will definitely miss some of the Emacs features, especially Org mode. I really don't wanna leave the Emacs ecosystem, but it's just too unpopular to actually be useful and receive good support. Everyone just makes plugins for VSCode nevertheless...
@geryz7549
@geryz7549 5 ай бұрын
Neovim has lots of Org mode alternatives, most notably Neorg, although they may not have all the functionality of Emacs' Org mode
@trejohnson7677
@trejohnson7677 5 ай бұрын
if it makes u feel better getting prety much anything except software-you-write to work on nix is a fucking pain.
@hansdampf2284
@hansdampf2284 5 ай бұрын
Can I install emacs?
@wiltedblackrose
@wiltedblackrose 5 ай бұрын
Sounds amazing! What about lazy loading?
@vimjoyer
@vimjoyer 5 ай бұрын
There is an issue opened called "[Feature] Lazy loading", so I guess it's coming
@wiltedblackrose
@wiltedblackrose 5 ай бұрын
@@vimjoyer Great! Thank you!
@0xCAFEF00D
@0xCAFEF00D 5 ай бұрын
Sorry to bring some negativity. But I don't see the point. The video doesn't quite make the case for nixvim and would be greatly helped by an introduction explaining the core ideas. From this presentation it seems a marginal difference to just default neovim configuration with lazy. You have your lazy.lua with a plugin list (identified by string rather than plugins.plugin.enable like here). Plugins often require you to run a setup. Frequently just a require and a setup function call with no argument. Which you could do with the config field in lazy, it's just a very tiny difference. The *_potential_* benefit I do see is that nix might provide defaults for supported plugins that may lack them. It might resolve keymapping conflicts or overall have a system of keymapping structuring that makes it maximally consistent for whatever plugins you might use together. But that's not presented here. That would be incredibly useful for someone who wants defaults as much as possible. You set options in a very similar way, vim.o.shiftwidth=4, just not declared in a table. Of course neovim options aren't just in .o, so clearly this is good if they're now sensibly unified. I find the lsp config presentation most confusing. It would be one thing if just that server list with .enable was required and it creates nice sensible defaults for you with literally no config on your part or only exposing a set of rebinding options. In line with the key mappings idea. But you've replicated the lsp_config example config on github within a difference of maybe 5-10 lines. And you've obfuscated control. With lsp_config it's perfectly clear. It uses vim primitives like autocmd which will be used elsewhere in almost any config. The benefit is just so marginal. Maybe the big benefit isn't mentioned. Maybe the person who made nixvim absolutely loves declarative configuration and this is for those people. That's good. But from my perspective it's not that different.
@vimjoyer
@vimjoyer 5 ай бұрын
I agree with you on some points, but the difference between using lspconfig and nixvim is that nixvim I also installs lsp servers for you. It's more comparable to Mason, minus installing dependencies like npm. Nixvim ensures that your setup will work on every machine.
@0xCAFEF00D
@0xCAFEF00D 5 ай бұрын
​@@vimjoyer You're right, I forget I have mason becuase I don't have to touch it. Which to me doesn't make it that important to abstract away. OS support is a big plus. I would guess that newer neovim users are more likely to have to use windows some of the time.
@durhamparkour
@durhamparkour 5 ай бұрын
How do you take this flake and use it as you would the regular neovim package system wide?
@vimjoyer
@vimjoyer 5 ай бұрын
Many ways to achieve it: 1. Use home-manager/NixOS module 2. Add this flake as an input to your flake and take default package from there 3. Just copy the output part from this flake into your home-manager/NixOS flake systemPackages
@pmmeurcatpics
@pmmeurcatpics 3 ай бұрын
​@@vimjoyerI've been struggling to wrap my head around this for 2 days now.I wanted to define the nixvim configurations in a file called nixvim.nix, and then import it into home.nix. But I get a recursion error when I do that. My setup has these 3 notable steps: 1) `modules = [./home.nix];` in flake.nix 2) `import = [./nixvim.nix];` in home.nix 3) `import = [inputs.nixHomeManagerModules.nixvim];` in nixvim.nix 4) ..and then I hope to put the actual nixvim setup inside nixvim.nix Now that I think of it, in step 3, nixvim.nix calls `inputs`, which is defined in flake.nix, which in step 1 itself calls nixvim.nix (via home.nix), and I guess that's why the recursion happens. The only solution that comes to mind is to somehow re-export inputs.nixHomeManagerModules.nixvim as nixvim from inside flake.nix, so that nixvim.nix can then just use it without causing recursion, but I'm not sure if/how one can do this. But you somehow aren't having to do any of this in your video, and use a flake instead. What I don't understand is how you connect it to your home-manager configuration. Do somehow import that flake into home.nix somehow? Or maybe even the home-manager's flake.nix? If so, how?? I honestly have no idea anymore
@GeorgeGzirishvili
@GeorgeGzirishvili 5 ай бұрын
Is there an easy way to convert my existing shell customizations into Nix language syntax? I use a theme, plugins, aliases, functions, set environment variables, etc. I also try to make it portable, so it works on multiple shells, and sometimes I use loops to do multiple operations. Can I replicate this wit Nix? I know Nix is functional, not procedural.
@vimjoyer
@vimjoyer 5 ай бұрын
Home-manager has options for all major shells, and interpolating packages into them ensures that your shell will work the same way on any OS. Managing themes and plugins with nix is also very easy.
@adjbutler
@adjbutler 3 ай бұрын
Nixvim > lazy
@grawlixes
@grawlixes 4 ай бұрын
What if I want to install and configure nixvim entirely from my home-manager?
@vimjoyer
@vimjoyer 4 ай бұрын
Use home-manager module and configure everything with `nixvim = {}` option
@grawlixes
@grawlixes 4 ай бұрын
Thank you, loving the vids @@vimjoyer
@karlwalter666
@karlwalter666 3 ай бұрын
@@vimjoyerHow exactly would you go on about this solution? I'm using flakes and declaring home-manager module in my flake.nix, but I struggle to make the nixvim option visible in home.nix.
@ivanjermakov
@ivanjermakov 5 ай бұрын
So Nixvim maintainers need to support configuration of every plugin in existence? Does not sound sustainable.
@ivanjermakov
@ivanjermakov 5 ай бұрын
I checked the source code and they really have flake configuration for every plugin they support, some of them are over 500 loc long...
@GaetanLepage
@GaetanLepage 5 ай бұрын
I have a fairly low amount of sleep time.
@sachinchaudhary1310
@sachinchaudhary1310 2 ай бұрын
@@GaetanLepage sad
@GaetanLepage
@GaetanLepage 2 ай бұрын
More seriously, we are shifting to adopting the "settings" convention from RFC-42 for the plugins. This is much more sensible and sustainable.
@sachinchaudhary1310
@sachinchaudhary1310 2 ай бұрын
@@GaetanLepage means u don't have to make those settings thing ? user can do normally ?
@mzakyr342
@mzakyr342 5 ай бұрын
is somoene make a package manager using brainf**k i don't know how to make it
@vimjoyer
@vimjoyer 5 ай бұрын
Make a brainf**k to nix transpiler 🧠
@mzakyr342
@mzakyr342 5 ай бұрын
@@vimjoyer somoene proably makes a brainf**k compiler in nix maybe somoene could do it.
@lukeE632
@lukeE632 15 күн бұрын
Have you managed to modularize your nixvim config and keep stylix working? I followed a blog post from Valentin Pratz about using "inputs.nixvim.legacyPackages.x86_64-linux.makeNixvimWithModule" to allow the config to span multiple files, but stylix doesn't seem to detect and theme nixvim anymore, and I can't work out how to tell it to.
@vimjoyer
@vimjoyer 12 күн бұрын
I prefer to have a separate theme for my editor, so I didn't connect my neovim to stylix
@ujulspins
@ujulspins Ай бұрын
What the actual fuck
Declare Hyprland Config With Nix Home-Manager
4:38
Vimjoyer
Рет қаралды 16 М.
Modularize NixOS and Home Manager | Great Practices
8:07
Vimjoyer
Рет қаралды 16 М.
I’m just a kid 🥹🥰 LeoNata family #shorts
00:12
LeoNata Family
Рет қаралды 19 МЛН
3M❤️ #thankyou #shorts
00:16
ウエスP -Mr Uekusa- Wes-P
Рет қаралды 7 МЛН
Nix flakes explained
7:22
Vimjoyer
Рет қаралды 65 М.
Is Nix Your New Terminal SUPERPOWER?
15:21
DevOps Toolbox
Рет қаралды 17 М.
Is NixOS The Best Gaming Distro | Linux Gaming Setup
8:37
Vimjoyer
Рет қаралды 21 М.
Nix and NeoVim
13:38
ThePrimeTime
Рет қаралды 121 М.
I was WRONG! This is the BEST Package Manager.
10:25
Chris Titus Tech
Рет қаралды 135 М.
Become A Neovim Kangaroo
6:54
Code to the Moon
Рет қаралды 55 М.
Perfect NixOS | Impermanence Setup
8:52
Vimjoyer
Рет қаралды 16 М.
Ultimate NixOS Guide | Flakes | Home-manager
15:30
Vimjoyer
Рет қаралды 117 М.
NixOS Has One BIG Problem
17:48
The Linux Cast
Рет қаралды 62 М.
После ввода кода - протирайте панель
0:18
cute mini iphone
0:34
승비니 Seungbini
Рет қаралды 6 МЛН