NixOS On ANY VPS | nixos-anywhere guide
ฝัง
- เผยแพร่เมื่อ 5 ก.พ. 2025
- Discord server: / discord
Donations: ko-fi.com/vimj...
Donations: buymeacoffee.c...
nixos-anywhere: github.com/nix...
examples repo: github.com/nix...
disko: github.com/nix...
A video about installing NixOS anywhere remotely.
Awesome video, vim! nixos-anywhere also has a terraform module, so you can provision, install and update ALL your NixOS configurations with one command, rather than having multiple tools to do each part.
The NixOS wiki is deployed using nixos-anywhere terraform, on hetzner cloud.
Can I install NixOS on a dead badger?
only one way to find out
Sure, on a Breezy Badger!
(Ubuntu 20.04)
If I'm not mistaken how nixos-anywhere also uses your local nix store when doing its thing which in turn should speed it up quite a bit if you're installing on many machines. Great video!
Yes
you would have to pass --no-substitute-on-destination or it will pull from the configured caches (which would default to the nixos cache)
I recently set up NixOS using NixOS-anywhere on my VPS. My hosting provider uses cloud-init to provision networking configurations so the generic config didn't work right away.
I enabled the NixOS module for cloud-init, but it failed to set up the IPv4 gateway (it's in a different subnet with my provider).
You can work around that by booting into the working OS (e.g. Ubuntu) and just copying the static IPs and Gateway to your NixOS config. That works unless they change the gateway, which hasn't happened yet for me.
After these shenanigans everything works just fine! I got my disk formatted with btrfs and everything's been rock solid as you'd expect.
Exciting episode
Enjoyed this video 👍
Certified Banger 🗿
Love it!
Vimjoyer the 🐐
I really really like the style of your videos, the animations and transitions are very cool. How do you make them? Do you use something like manim to create the videos or it’s full on editing? What do you use to edit?
I use motion canvas
@ I appreciate the response, thanks
The hardest part is to figure out how to get disko to work.
haha, yeah
it's much better than infect script imho, thx :D
ok, so after switching all my work machines, I will start switching all my linux servers to nixOS? 🤔
If only there was a coolify pkgs package 🤞
Can someone tell me why i'd want to install or use something standalone rather than as a module? I saw this option in a few programs, notably nixvim, and I'm not sure what the pros and cons are?
wait, was it that simple??
can you make a video on a good way to make server config from scratch? like can we do things we do in docker-compose like having a network?? or should i be configuring docker in nixos, keeping nixos just as a base?
how about databases?
You can basically just add the disko module and the disko config to an empty config, and that's all you need for a bare-bones config. Afterward, you can just treat it as a normal NixOS config
You're free to choose how you deploy your applications.
I personally declaratively create VMs using microvm.nix and configure the services inside the VMs just with NixOS modules and systemd.
But many VPS providers don't support virtualisation, so you could go for NixOS's declarative docker/oci containers or nixos-containers (with systemd-nspawn).
If you want to start simple and already have some docker knowledge, you could also install docker and then start services using docker-compose as you would on other distros.
@@lordkekz4 a start up i am currently in we are using spring-boot, which has excellent docker support, but i do wanna use nix, issue is, we only have limited resources and time, so can't waste time trouble shooting nix😅, atleast, atm...
I'm pretty dumb when it comes to NixOS + Homemgr. Do you have any other guides on what Home manager is and how to use it that isn't your video on it? I watched it but its still not clicking
I am going to make a more in-depth home-manager guide pretty soon
yay
Where minecraft bro pls babe. Give me my minecraft
fr, I have been waiting for Minecraft all day. wtf
oh yes moar nix
First
why is yt not recommending me your videos??? literally, i get recommended new videos from everyone else right after they upload, but for you the only way to watch your videos is by either manually going into the subscriptions feed or by getting the notification from Discord...
Yeah, videos are doing much worse lately. I need to figure out why
I recently got into nixos due to you videos and i am having a little trouble with stylix. I enabled the stylix and and did every configuration but when i run nixos-rebuild command it give me a error { `home-manager.users.suzal.programs.ghostty' does not exist }, but i haven't mentioned ghostty in entire configuration. So can you please give me a way to fix it please,