Hey friends, I hope you enjoyed the video! I have a small favor to ask. I'm growing my Twitter account, so I'd appreciate it if you could give me a follow. twitter.com/mischa_vdburg It's a free way to support me and the channel! I've also started a newsletter. Feel free to check it out: mischavandenburg.substack.com/
I spent weeks trying to figure out devcontainers in neovim. Now I just use nix shell. It’s an amazing solution. With direnv I cd into my project, all dependencies are loaded and setup, and I even load a custom zellij layout. So all my panes are already setup on a per project basis
One thing to add. Setting up databases will pretty much always be better using docker (therefore dev containers). I usually prefer to include db build scripts as part of my startup flow though.
Can you isolate the project folder with Nix shells? With devcontainers I can mount only the project's folder (and a cache for things like pnpm so its shared between proejects) without exposing the rest of the filesystem. Genuine question, I haven't used Nix ever but everything I read about it seems amazing, I'd daily drive it just for the dependency management regardless of replacing devcontainers or not, but seems like a big switch from usual distros.
Cool vid, I noticed you typed lspinfo several times due to capital characters not matching. This is pretty annoying, but can be solved with this setting `vim.opt.infercase = true` which infers letters capitalization in insert mode and command line mode.
My nvim config has a setup for auto installing my lsps, linters and formatters on first open as well, this is why I went for a custom cfg instead of using lazy. Took a little extra setup at first, but is smooth now.
@@mischavandenburg yeah, installs all of them, but maybe you could have the container endpoint run a nvim instance headless to install the extras here. You could pass the baby off the extras as a parameter to a little script there.
I use nix and nvim on osx and primarily develop in docker compose containers, so I’m eagerly looking forward to the next video. Using nvim inside of docker , with my conf, is a pain point I’ve been trying to solve for years.
I am wondering if this can provide the same security benefits of a (correctly configured) docker container. Pulling in many third party dependencies (npm etc.) feels more and more problematic. With the shown way of putting nvim into the container you also solve the same problem for it if there ever should be a malicious nvim plugin. Can I achieve the same isolation of main os/user and projects with nix? All I heard so far is that it is superior in setting up projects with pinned dependencies but does not bring any benefits in case of supply chain attacks. Honest question
Legit! the tradeoff is worth it as you can modify the environment as needed if custom variables or tool versions are needed. Bringing neovim along is a must! I'm gonna add neovim to my security research container soon!
Excellent and really interesting. I would much like to separate my various customer work in a safe and predictable way. Nix seems so hard to get my head around (not interested in the OS, only the package management part). Looking forward to your next video. Thanks and take care.
I need to setup a homelab with tailscale and using this setup I can use a macbook air to handle all my needs to work remotely with great workspace separation and compartimentalization of stuff
Yes I think this is the way to go. Homelab is best, but DevPod also lets you run the workspaces on a VM on your chosen cloud provider, so you can use that as well until you get your own setup.
This is pretty good, but motivation is immediately work from any computer. Is at least questionable about project what u are working, because ur motivation looklike could resolved ssh. Other hand how many time u should to run from different laptop? But i know real reason why u did it. Is pretty simple. U buy a cluster for home and try to find how to utilize it) I know this felling because i'm the same)
Wonderful topic and good video. Perhaps, I am going to subscribe your channel depending on your next video. IMO, your method is copying your neovim config every container and repeat it many times making it difficult to maintain, and which is different from vscode's client and server architecture. Nix can help automatically maintaining different but similar configs by pinning different commints . Working with mountable shared volumes or directories and nix's Experimental Local Overlay Store, the storage of the container will be small and much more portable. I am really looking forward to your next video. My further question is: how to combine the project its own container and code base with devcontainer? Config in devcontainer.json from images? and base on it to install your config?
I don't think these products are bad. It's just that there are better alternatives available. I also think these devices are more designed for the general public and office workers who only need powerpoint and web browsers
Yeah, but many people are locked in Windows because of .NET Framework. No, you cant upgrade if your hands are tied by vendors who ignores newer .NET. And here I can watch the goodies from a MS dev. We are not even allowed to use wsl(1,2) with Windows dev, hail the deceision, not to mention the perf.
Im managed to create my own devcontainer, but some thing that's annoying me is the fact that nvim, just doesn't render properly sometimes, text on screen doesn't redraw, and it just gets stuck, may i ask? what terminal emulator are you using as it seems it's not happening to you
Hey friends, I hope you enjoyed the video!
I have a small favor to ask. I'm growing my Twitter account, so I'd appreciate it if you could give me a follow.
twitter.com/mischa_vdburg
It's a free way to support me and the channel!
I've also started a newsletter. Feel free to check it out:
mischavandenburg.substack.com/
I spent weeks trying to figure out devcontainers in neovim.
Now I just use nix shell.
It’s an amazing solution. With direnv I cd into my project, all dependencies are loaded and setup, and I even load a custom zellij layout.
So all my panes are already setup on a per project basis
One thing to add. Setting up databases will pretty much always be better using docker (therefore dev containers).
I usually prefer to include db build scripts as part of my startup flow though.
Can you isolate the project folder with Nix shells? With devcontainers I can mount only the project's folder (and a cache for things like pnpm so its shared between proejects) without exposing the rest of the filesystem.
Genuine question, I haven't used Nix ever but everything I read about it seems amazing, I'd daily drive it just for the dependency management regardless of replacing devcontainers or not, but seems like a big switch from usual distros.
Cool vid, I noticed you typed lspinfo several times due to capital characters not matching. This is pretty annoying, but can be solved with this setting `vim.opt.infercase = true` which infers letters capitalization in insert mode and command line mode.
Great usecase for different customer/projects working with Devcontainers and Neovim, thanks alot!
Glad it was helpful!
My nvim config has a setup for auto installing my lsps, linters and formatters on first open as well, this is why I went for a custom cfg instead of using lazy. Took a little extra setup at first, but is smooth now.
But does it install all of the lsp's every time? With this setup, I can tailor it for each environment
@@mischavandenburg yeah, installs all of them, but maybe you could have the container endpoint run a nvim instance headless to install the extras here. You could pass the baby off the extras as a parameter to a little script there.
I use nix and nvim on osx and primarily develop in docker compose containers, so I’m eagerly looking forward to the next video. Using nvim inside of docker , with my conf, is a pain point I’ve been trying to solve for years.
It’s released now!
@@mischavandenburg Amazing, thank you!
I started using devbox and really like the nix experience without containers.
I am wondering if this can provide the same security benefits of a (correctly configured) docker container.
Pulling in many third party dependencies (npm etc.) feels more and more problematic. With the shown way of putting nvim into the container you also solve the same problem for it if there ever should be a malicious nvim plugin.
Can I achieve the same isolation of main os/user and projects with nix?
All I heard so far is that it is superior in setting up projects with pinned dependencies but does not bring any benefits in case of supply chain attacks.
Honest question
How collaborative is this approach? Will there be issues when multiple people connect to it?
Legit! the tradeoff is worth it as you can modify the environment as needed if custom variables or tool versions are needed. Bringing neovim along is a must! I'm gonna add neovim to my security research container soon!
@mischavandenburg : How did you get to install devpod on Talos Linux? I am new to Talos Linux and prefer to keep using it and not fall back to k3s.
Excellent and really interesting. I would much like to separate my various customer work in a safe and predictable way. Nix seems so hard to get my head around (not interested in the OS, only the package management part). Looking forward to your next video. Thanks and take care.
Thank you for the comment. When I discovered this method of separation I was sold immediately!
Nix as a package manager is really simple for simple use cases. You should give it a try. Nixos and Darwin nix is where things get difficult.
I need to setup a homelab with tailscale and using this setup I can use a macbook air to handle all my needs to work remotely with great workspace separation and compartimentalization of stuff
Yes I think this is the way to go. Homelab is best, but DevPod also lets you run the workspaces on a VM on your chosen cloud provider, so you can use that as well until you get your own setup.
Hi bro, Can you share me your colorscheme on your terminal and lazyvim?
This is pretty good, but motivation is immediately work from any computer. Is at least questionable about project what u are working, because ur motivation looklike could resolved ssh. Other hand how many time u should to run from different laptop? But i know real reason why u did it. Is pretty simple. U buy a cluster for home and try to find how to utilize it) I know this felling because i'm the same)
A Microsoft MVP using Mac. Blasphemy - I Like IT! xD
I am a man of several glaring contradictions. Thank you for the comment!
Wonderful topic and good video. Perhaps, I am going to subscribe your channel depending on your next video. IMO, your method is copying your neovim config every container and repeat it many times making it difficult to maintain, and which is different from vscode's client and server architecture. Nix can help automatically maintaining different but similar configs by pinning different commints . Working with mountable shared volumes or directories and nix's Experimental Local Overlay Store, the storage of the container will be small and much more portable. I am really looking forward to your next video. My further question is: how to combine the project its own container and code base with devcontainer? Config in devcontainer.json from images? and base on it to install your config?
BTW, what do you think about neovim --remote?
All of these I will explore in upcoming videos, so stay tuned! I did see nvim --remote but it did not seem to suit my needs. I prefer using devpod
@@mischavandenburg I am looking forward for it.
Oh yea gonna need this to use codespaces via machine with 0 room for dev environment lol
I have no idea what you mean
@@mischavandenburg I've not used dev containers before....it will be helpful for creating dev environment in github codespaces
@@comosaycomosah oh yeah they are super useful !!
first, autoliked
Surprise you hostname same with me
mac-beast too? 😁
Very Nice !!! I'm "doubling down" on @CristianHeredia0 's comment: Looking very forward to your next video using nix instead of homebrew. Thx Misha 🙏😊
It’s now released!
So sad. Even microsoft devs don't use windows.. or surface laptop.. is those products that bad and expected us to use.... 🤣
I don't think these products are bad. It's just that there are better alternatives available. I also think these devices are more designed for the general public and office workers who only need powerpoint and web browsers
@@mischavandenburg have you seen ChromeOS devices? They dont even have power point running 😆 . They do though run LXD containers 💪
Yeah, but many people are locked in Windows because of .NET Framework. No, you cant upgrade if your hands are tied by vendors who ignores newer .NET. And here I can watch the goodies from a MS dev. We are not even allowed to use wsl(1,2) with Windows dev, hail the
deceision, not to mention the perf.
@@redcoreit LOL. thats how i discovered the taste of freedom for the first time of life in UNIX system 12 years ago.
@@ash1kh sigh
Im managed to create my own devcontainer, but some thing that's annoying me is the fact that nvim, just doesn't render properly sometimes, text on screen doesn't redraw, and it just gets stuck, may i ask? what terminal emulator are you using as it seems it's not happening to you
I get too many technical questions every day, so I answer these questions in my Skool community.
Found a fix if anyone needs it: just change you TERM environment to "screen-256color"