I just started using it and am falling in love. I need to rebuild my homelab and will attempt to go for as much nixos as possible. My favorite aspect is that once I figure something out, it's now done in perpetuity and the solution documented in the code. I don't have to keep a separate wiki or documentation and re-learn how to do things every time. As you get going, there are flakes and home-manager which start to complicate things while also expanding Nix's power. Learning NixOS seems a bit harder than other "different" Linuxes due to it being multiple new paradigms all at once, so I've been gobbling up guides on KZbin.
@FlackonАй бұрын
I've been using Ansible playbooks for that, which aren't as declarative as NixOS, but more portable. I'm curious to try NixOS as a server OS though. Not sure what I would use it for. For example, Cockpit is not as well supported as it if for e.g. Debian
@shady4tvАй бұрын
@@Flackon not as well supported? in what way?
@FlackonАй бұрын
@@shady4tv The Cockpit VM management module, for instance, just doesn't work on NixOS. If you want a VM or container management UI, you have to use Incus or similar. The packagekit module also isn't supported, for obvious reasons
@matei9kАй бұрын
Why not GNU Guix?
@HeieiX2 ай бұрын
I’d argue the reproducibility of NixOS makes it the best Linux distribution, period. It can be light or heavy, depending on your config. It can be a server or desktop, depending on your config. Started using NixOS over the past 20 months and it has impressed me more than any disto before it.
@maxarendorff65212 ай бұрын
NixOS is THE BEST server distro IMO. I've been using it for that for years and I could not imagine going back to anything else at this point.
@danielpicassomunoz27522 ай бұрын
Any recommended tutorial?
@benji_builder2 ай бұрын
@@danielpicassomunoz2752 vimjoyer is super good imo
@maxarendorff65212 ай бұрын
@@danielpicassomunoz2752 Just read the relevant parts of the manual and wiki to get going. There's some useful videos on KZbin as well but don't bother with the more advanced stuff like flakes and home manager in the beginning.
@AppsTricksByNazakatUmrani2 ай бұрын
My brother, it isn't only the best for servers, it is best for normal daily drive machines as well, I have been using NixOS for a few months now, and I myself can't imagine my life without it
@james-cucumber2 ай бұрын
@@danielpicassomunoz2752Vimjoyer gives a pretty good introduction, EmergentMind has some fantastic videos with more details. One way I learned a lot (and still do!) was looking through others’ dotfiles. Using google’s `filetype:nix` or your search engine’s equivalent is very useful for this.
@jan-Juta2 ай бұрын
NixOS is what got me to stop jumping distros, with home-manager and flakes it's pretty much perfect for my desktop and server needs. As for your setup I'd recommend at least getting flakes set up, and dropping docker in favor of running your services the Nix way, your docker containers are unmanaged state, when you copy over your config to a new machine they won't be carried over.
@danielpicassomunoz27522 ай бұрын
What's the nix way?
@moh.anifyuliansyah98632 ай бұрын
@@danielpicassomunoz2752 Doing computing task with Nix lang
@magnificoas3882 ай бұрын
Same for me: NixOS/plasma6.1/wayland/Nvidia3060 w last 555 betadrivers: ALL is flawless for me
@james-cucumber2 ай бұрын
@@danielpicassomunoz2752systemd services defined in your nix config is the “nix way” to run services I think. You can also define your docker containers in your NixOS config similar to docker-compose
@rbdm2 ай бұрын
@@danielpicassomunoz2752I’d assume it’s creating a package and the respective options for it. Obvious issue with that is not all package managers or languages being equally well supported.
@J.erem.y2 ай бұрын
The reason we use the method of adding users to groups declaratively separately is so if you want to remove docker you can just edit it in one area. This way it will remove docker and you from the group instead of removing the line for docker and going all the way to your user section. Best to use the user settings at the top as a base you can put on any machine and only add to the groups if the services are there.
@DavidDavies-eu7fi2 ай бұрын
You can also put containers (systemd containers, who knew 🙂) into the nix config as well. So you could deploy a whole system + containers with a single text file. Pretty cool
@magnificoas3882 ай бұрын
You can use NixOS LXC containers too with the help of Incus
@HORUS-ITАй бұрын
Even after only a short period of getting to know NixOS for test/lab type servers, I was already impressed with the robustness of the package manager and the quality of available documentation. The "unofficial" Wiki deserves special mention, providing copy-and-paste ready configuration snippets for nearly everything I wanted to do. I am currently in the process of switching production servers over to NixOS, and it has been going without any problems so far. My next goal is becoming more fluent in the Nix Language. In summary, I found that declarative system configuration with the added benefit of not having to worry much about software dependency hell is indeed as great as it sounds, at least for the kind of servers I operate.
@OOO-mn1dsАй бұрын
Idk why but this seems as written with AI 😂😂
@HORUS-ITАй бұрын
Nothing artificial about it, kiddo. 😉
@kamikaze_twistАй бұрын
Same here, thinking of switching out my ubuntu cloud init vm templates running custom vendor.yaml files with NIX-OS template and a range of predefined config files for provisioning a server as heavy and light as I want. The cloud init custom scripts are barely as configurable as this seems to be. Baffles why more development and widespread enterprise adaption is not done for it! And the best part is that you can have one completely bare bones master vm template that allows ssh, push the required configuration file for that vm, switch and rebuild and you are done!
@DylanMatthewTurner2 ай бұрын
I love it for my daily driver even. Just for the fact I don't have to remember I edited some random /etc file at setup when it causes problems down the line. All my changes from default (packages, configs, etc) are all in one place. It's just so convenient
@magnificoas3882 ай бұрын
yes same for me: configuration.nix is my precious :)
@sparky8251Ай бұрын
And unlike with tools like ansible, deviations are all kept here vs only the ones done with the tool, while still allowing for "handmade" deviations from the baseline. That stuff bites you years in and I love that nixos flat prevents it from ever happening.
@daliareds2 ай бұрын
For the nmcli connection command, you can give it the `--ask` flag instead of the password argument and it'll prompt you for the password and keep it hidden. That way you don't have to add the blur in post
@matthiasbendewald18032 ай бұрын
and nobody can look it up in your history file of your shell if you forgot to remove it there...
@crackpippiАй бұрын
Better yet, fire up nmtui and you have a terminal ui.
@matthiasbendewald1803Ай бұрын
@@crackpippi That is awesome, didn't know that, thank you!!!
@agustinperezdelcastillo1593Ай бұрын
Please make a video on setting up NixOS for desktop/laptop daily driving as a developer! I've been getting into it recently and noticed there's very few good KZbin guides on it, most of which are at least partially outdated. Your videos have always been extremely helpful for everything Linux, so would absolutely love to see you dive deeper into NixOS, and I have a feeling lots of other people looking for good entry resources will also find it helpful! Thanks for all you do!
@krtirtho2 ай бұрын
I like to think NixOS as the Docker configuration for your Host system. I really love it's declarative approach to configuring the OS. It's awesome. In future, I hope NixOS will have a GUI config for desktop users.
@willfrisbie79182 ай бұрын
Awesome video. Please keep the NIX OS content coming!!
@gusslx2 ай бұрын
I think NixOS is actually a server oriented distro. I used it as my desktop daily driver for a year and it took a lot of shenanigans to make it work. Turns out immutability and lack of dynamic libraries may not be something you need nor want. Came back to Pop OS and I'm happy with it. For the server though, NixOS is the wet dream of any sysadmin.
@jan-Juta2 ай бұрын
With home-manager and flakes it's a great desktop distro. Just a bit more complicated of an initial setup.
@gusslx2 ай бұрын
@@jan-Juta yeah but I don't want my OS to fight me to get stuff working. I use HM but only for CLI tools. NixLD for GPU accelerated apps is not too reliable yet.
@james-cucumber2 ай бұрын
The other errors (actually warnings despite the red) you mentioned are just a couple of renamed options in the latest (24.95) version of NixOS. I’m guessing your config was started with a 23.11 default config, rather than a 24.05 default config. It’s just a case of finding and replacing the one instance of `services.xserver.layout` to `services.xserver.xkb.layout`, and the same for `variant`. Awesome to see more people getting into NixOS, thanks for the video!
@InspiredScienceАй бұрын
0:38 - it's dupli-kit-able. Nice! Thanks for your videos, they're always excellent and most importantly, paced considerately / not drawn-out.
@thomziq2 ай бұрын
I was thinking the same thing of making a NixOS Jellyfin media server instead of Ubuntu one :) Thanks!
@saffanalvy2 ай бұрын
I have seen a lot of nixos videos and never felt like using it. But this video, with the simplicity of Brandon, made me feel like I should use it as well.
@vodros2 ай бұрын
You don't need to add Cockpit as a package, setting it up as service takes care of that for you :)
@brainstormsurge154Ай бұрын
Thanks, I was about to comment that as well. It doesn't hurt anything but it is redundant. Also, you can look at options like the Cockpit as different search engine on the same page you search for packages. It's in the top of the page.
@Zendal79Ай бұрын
Services are also auto opened in firewall
@cnlawrence1183Ай бұрын
I've been "daily" driving nixos on my personal laptop. I'm using flakes and homemanager. Homemanager is great as you can sync home profiles over os's like Linux, MacOS and WSL2 as well as a synced dotfiles if you use git to version control. Gnome settings is super easy to keep extensions and config declared. This has brought the best modularity to crafting your own distro. It's easy to change out things like gnome for kde.
@linuxbasics70602 ай бұрын
colour me intrigued. I'm going to have to try it in a VM i like the config file approach
@argee55Ай бұрын
Thanks for the video. I’ve been attempting to setup a Linux server and have been stumbling with other distro’s. I’ll definitely be trying NIX. Thanks again.
@WhyDoesNothingWorkАй бұрын
I really like NixOS for servers, i've been using it for quite a while now and have hundreds of installs in production, I definitely do not miss managing ubuntu/centos even a little bit
@dmezeyo59412 ай бұрын
I noticed you used the port 9433 instead of port 9443 at time 10:40, Wondering if you did need to open the ports in the firewall section.
@trashkenАй бұрын
Wanted to say the same thing
@silentbob12362 ай бұрын
nix-shell alone makes it worth it to use Nix. I switched about a year ago and have not looked back.
@eldinoАй бұрын
The central configuration file is pure genious!
@rlifts2 ай бұрын
It's not all sun shine and rainbows. Wait till you have no internet and have to fix something or use a binary. That being said, the good far outweighs the bad so that's why it's still my daily driver.
@allliver1232 ай бұрын
ive been dual booting nixos for about a month now and its awesome
@Dakforever129 күн бұрын
I just moved back to arch, but nix as a server for docker is something I should try
@EthorbitАй бұрын
NixOS is perfect for servers. I stopped using Ubuntu Server once I setup a NixOS config and will never go back. I think it's actually the best distro, period. Switched workstation from Arch Linux to NixOS which has benefited hugely from the way package environments are handled and soon I plan to switch gaming from Windows 11 to NixOS because I'm sure the reproducible nix configuration will be PERFECT for the tweaks some specific games will need, to have it all version controlled and easily readable in code makes this all a lot less of a painful experience.
@furbyonsteroidsАй бұрын
I tried NixOS a while ago as a Desktop and really liked it, but I did have an issue with firefox where despite being on KDE it would always use the Gnome window decoration no matter what. So no minimize/maximize buttons. Could never figure out how to fix it even after googling for hours and it bothered me so I went back to a "normal" distro. But that's NixOS's biggest weakness imo. The lack of documentation. Sure, there's a lot but imo it's not enough. As a server distro however, I could see it being really useful.
@donaldwilliams68212 ай бұрын
Nixos is amazing. it's my daily driver Home manager and Flakes makes it way more interesting and powerful Enjoy and keep making nixos videos!
@sherrilltechnologyАй бұрын
I had someone mention that OS in my comments on my video of Arch vs Mint, maybe now I am going to try it!! Great video!!
@magnificoas3882 ай бұрын
Thx for this particular topic! I am using NixOS as a desktop and as a server too. You can use the combo NixOS/Incus for homelab! Very nice as you can stay in the NixOS realm for both Incus server and linux(NixOS) containers (LXC) :)
@nadtz2 ай бұрын
I've just started playing with NixOS and it's very different but I can see why people like it. Once I finish wrapping my head around it I could easily see it becoming part of my homelab setup.
@moh.anifyuliansyah98632 ай бұрын
I glad you try NixOS too. I'm use it too on my lovely laptop and I love it with it. Don't forget for trying setup Flakes too, Bro. You will get much advantages from it. Good job 👍🏻
@zenmaster24Ай бұрын
can you do a video on flakes? like how you migrated from configuration.nix to a flake for example
@mikedoth2 ай бұрын
It's like a built-in ansible which is kinda cool.
@loremipsumamet24772 ай бұрын
Nahh the bot comments are crazy annoying
@xbz24Ай бұрын
thank you for the intro to nix
@adjbutlerАй бұрын
i use NixOS btw (my main desktop) switched from windows 12 months ago
@darthkielbasaАй бұрын
Alright, this is kinda fun. I fat fingered something, rebooted and chose a previous build. Now i get to screw up all over again. Pretty sweet.
@StinoskoАй бұрын
I used nixos to get nvidia driver with cuda and docker cuda support to work on my home server. I tried manually installing in ubuntu server but failed couple of times. I found a nix configuration, switched to nixos server and it worked almost flawlessly. Only issue i still have left with nixos is trying to use vscode to remote connect inside nixos to manage my different projects on the server...
@kamikaze_twistАй бұрын
Thinking of switching out my Ubuntu Cloud-Init templates running custom vendor.yaml files with NIX-OS master template and a range of predefined config files for provisioning a server as heavy and light as I want. The cloud-init custom scripts are barely as configurable as this seems to be. Baffles why more development and widespread enterprise adaption is not done for it! And the best part is that you can have one completely bare bones master VM template that allows ssh, push the required configuration file for that VM, switch and rebuild and you are done!
@umad0p2 ай бұрын
Thx for the tip gonna spinn up a vm with it today and test it out.
@caspersmith7112Ай бұрын
curious started and got lost but still curious on something like a storage type tutorial video because your pretty in-depth
@TechHutАй бұрын
When you say storage are you talking network shares, file systems types, share types?
@caspersmith7112Ай бұрын
@@TechHut start with network attached storage basically with some add ons, but when i first started checking out NIX was at very start really wasnt much out there cause im honestly not the best reader.i learn better by like in person teaching. why youtube is best. i can see how its suppose to be start and end instead of a few screen-shots.if i mess up rewatch that part
@caspersmith7112Ай бұрын
@@TechHut like with docker can run video stream service thru it.. im probably one of few but proxmox and dell-t410 dont like each other, truenas is ok for just storage period for me
@YannMetalheadАй бұрын
Good introduction to NixOS.
@emilnordgard5228Ай бұрын
Nix is better for containers than docker
@anasouardini2 ай бұрын
They just need to throw an equivalent for `archinstall` on it.
@SAMS300FOXES2 ай бұрын
I could be wrong, but it may have been because you tried to go to port 9433 instead of 9443; I think typically Docker does handle the firewall configuration, but I've also never run it rootless. Would be love to know if that was the issue or if the firewall config was needed too.
@uuu123432 ай бұрын
NixOS is amazing about recreation and whatnot - until you need to perform system administration because something within nix breaks Like imagine you cant even use the nix rollback
@magnificoas3882 ай бұрын
hmmm
@bobbybologna30292 ай бұрын
interesting, ive always wanted more coverage on Nix but most people dont want to touch it because its so... "odd"? lol
@TheLazyJAK2 ай бұрын
I like usually like the documentation in the config file, but this seems like a bit much. I would rather start fresh with a blank file where I can overwrite the defaults instead of tweaking the giant file full of defaults. I know it doesn't technically make a difference, but it just feels better that way.
@ThalusAАй бұрын
I absolutely love the philosophy behind NixOS, however as of today I find it too hard to understand. The wiki is outdated, a lot of information aren't centralized, stability of flakes in order to not use nightly builds, the UX/UI for nix manager, too much cli commands when you want to do basic stuff. There should be a huge work on UX/UI especially standardisation about how to setup your system and local project as well. So I'm just waiting for it to be much better. Until then I'm still on Fedora
@AshLordCurryАй бұрын
Would it be a good idea to use this as a personal NAS
@sergiuoanes4635Ай бұрын
What's the name of the font ?
@justinharveyjohnashby2 ай бұрын
Hell yeah it is!! Woo!
@jakobw135Ай бұрын
Is there a way to TRY NixOS before installing, like you can with Fedora, using a thumb drive ISO file? If so, WHERE do I find this file? I haven't been able to, so far.
@kyfeman25 күн бұрын
When I was first playing with NixOS, I just installed it in a virtual machine. I used Virtualbox since it's free. When you are setting up the virtual machine, give it a decent amount of disk space as updates can nearly double the disk space used if a lot of files were changed. On my first attempt, I didn't know this and after a bunch of experimentation and a few updates, I ran out of disk space on a rebuild. To avoid this, learn how to list and delete system generations to free up disk space.
@iamrage47532 ай бұрын
Might replace debian12 with this, just wondering will a deskpi pro work script install ok, anyone know?
@DreamsAPI29 күн бұрын
NixOS is the best, however some pitfalls as it leaves security out. Hopefully security can be build into NixOS. Try it in a vm till you get comfortable then there is no going back to anything else eg windows or any number of linux distros'
@adjbutlerАй бұрын
you can make docker containers with Nix not just linux machines....
@MrAlanCristhian2 ай бұрын
4:53 nano 💪
@peterheggs5122 ай бұрын
I prefer ansible for servers. It gives me much more freedom and also allows me to have servers outside of the nixos realm, such as build servers for multiple operating systems - and it's also much easier to apply changes across multiple machines.
@jan-Juta2 ай бұрын
Ansible and Nix aren't really comparable. Ansible is automation, Nix is IaC, they're two very approaches, especially as it pertains to state management.
@peterheggs5122 ай бұрын
@@jan-Juta I'd disagree on that. Ansible is code to setup the infrastructure, which is pretty much IaC. Ansible is not automation like a simple script, instead it is used to bring a server to a certain state, which is a pretty similar goal with a different syntax.
@shekharnandkoemarsing1582 ай бұрын
@@peterheggs512 Ansible does not setup the infrastructure, Ansible configures the already deployed infrastructure, hence why you need to add hosts to a file with their ip in order for it to do anything. IaC is one way of actually deploying infrastructure, but not configuring it (you could, but it is recommended to keep these two thing seperate). Example: you would use Terraform to deploy a ubuntu VM, then you would use Ansible to setup the ubuntu VM with the software and config of that software that you want. The comment above yours isn't accurate tho either, "Ansible is automation, Nix is IaC", both Nix and Ansible can be seen as automation, actually anything that does not require any 'manual' steps, can be considered automation. Also, Nix is not IaC, you don't deploy the actual server with Nix, Nix is only configuring the server for you, so in that sense it actually is comparable to Ansible. What Nix and IaC have in common tho, is that they are both declarative in nature, meaning I define a config file somewhere where I paint a picture of how I want something to look like, and it then figures out the steps needed to get to that desired state. Ansible is a bit of a mixed bag in that aspect, originally it was not declarative, but over time more and more things have become declarative too, though there are exceptions. Where Ansible and Nix really differ, is in their philosophy if you will. Ansible embraces the idea of ad-hoc configuring, while Nix is more like Docker in the sense of immutuble image layers that create a very precise clone each time. In theory all Nix deployments should produce the exact same state each time, while the same cannot be said for Ansible (depending on what you're configuring tho).
@AslamNazeerShaikh2 ай бұрын
I always prefer debian based distro as they come with lots of software support.
@oscs45562 ай бұрын
Nixos is my daily driver with OpenSuse kalpa
@benjy288Ай бұрын
I used nixos for well over a year, its a pretty cool idea, some things can be hard to configure, but I ended up moving back to arch due to the woke diversity issue, and the mods shutting down talk about it on their discord, it also started happening in the nixos subreddit too
@magnificoas3882 ай бұрын
Finally !!
@mylinuxgr50502 ай бұрын
I am currently testing NixOS on a small backup server. I have this problem that whenever there is a power failure, the OS does not come back. It seems that it is stuck in the gnome login screen. I know that I can somehow change the settings, but I am not sure how to do this in NixOS.
@jan-Juta2 ай бұрын
That's a problem with how you configured GDM, not NixOS. Sounds like you want to enable autologin.
@danielpicassomunoz27522 ай бұрын
The real question is: why.in the world would u install a graphic interface to your server?
@mylinuxgr50502 ай бұрын
@@jan-Juta My question was if GDM configuration would be possible in an immutable distro, such as NixOS...
@mylinuxgr50502 ай бұрын
@@danielpicassomunoz2752 You are right. I just installed NixOS on a spare old PC that happens to be one of my backup servers, so Gnome was the default.
@magnificoas3882 ай бұрын
@@mylinuxgr5050 see this video here: TechHut choose server (headless) installation
@mateowoetam2 ай бұрын
Actually cool, I'ma look into using nix more
@simpleprogrammingcodes2 ай бұрын
What happened to your laptop???
@adjbutlerАй бұрын
NixOS!!!! NixOS!!!! NixOS!!! Nix Dev Ops is the best....
@RazoBeckett.2 ай бұрын
Nix is cool
@dianaisnthere22 күн бұрын
why is bro using microsoft edge
@RohambiliАй бұрын
WTF? Are you sure about that title? O.o
@kettusnuhveli3412 ай бұрын
Here to fight against the never-ending tide of comment bots!
@coffee-is-powerАй бұрын
Where are nix flakes?
@matthiasbendewald18032 ай бұрын
NixOS Made me Stop using docker as it is better.
@aimpizza6823Ай бұрын
How do you host services that are optimized for Docker and have no NixOS options?
@matthiasbendewald1803Ай бұрын
@@aimpizza6823 via docker, What Else?
@meow-is-edibleАй бұрын
@@aimpizza6823I use podman with a NixOS module called arion, check out, it's great! Took 4 years of NixOS to find this.
@matthiasbendewald1803Ай бұрын
@@aimpizza6823 i dont have such, but i would need more information to decide. It could be best to Just use docker or adjust the Service so it works fine in nix. If it is only the Options that are Missing it could be Just fine, If the Service can be easily configured by an config File?
@Ebisu13oАй бұрын
Nah, I'll stick with alpine.
@manjilunnobi2 ай бұрын
Secure os ... Nix os
@noahvemberАй бұрын
rip nixos. 4/5 board members resigned
@2KalebАй бұрын
??
@mgord9518Ай бұрын
I've used Nix for the last 3 years, really liked it but I'll probably be transitioning my computers to something else after this "purge" BS
@Dr-Zed2 ай бұрын
1. Set's up NixOS (awesome!) 2. Throws away most NixOS benefits by using docker Also docker bypasses the firewall on any Linux system by applying iptables rules automatically.
@TechHut2 ай бұрын
We learning out here
@Dr-Zed2 ай бұрын
@@TechHut once you figure out how easy it is to setup systemd units using nix you'll be mind blown :D
@magnificoas3882 ай бұрын
@@Dr-Zed you got it. You can use Incus too with NixOS
@DarrellWebb537Ай бұрын
Good OS maybe but toxic and trash devs
@dave7244Ай бұрын
Debian is the best distro. So no.
@HORUS-ITАй бұрын
Welcome to our comment bot overlords. At least I hope it's a bot, because then the comment could be forgiven.
@art3m_t1mofeevАй бұрын
How is debian better for server use? You have to heavily rely on a lot of self-developed ansible playbooks to have a more-or-less reproducible setup across a fleet of servers. But once you start introducing changes to existing infrastructure, it all slowly becomes a big, uncontrollable mess. Unless you frequently deploy from scratch, but I believe that's better handled with docker containers or k8s.
@dave7244Ай бұрын
@@HORUS-IT It is more of a play on a concept called "betteridge's law of headlines". Which states that if headline / title for an article is a question typically in the form of "Should I" the answer is almost always no.
@HORUS-ITАй бұрын
@@dave7244 The first sentence of your OP is nonsensical in itself, it is like stating "blue is the best colour". Nothing useful can come of it, so I hoped it could be excused by some bot/AI being a troll.
@dave7244Ай бұрын
@@HORUS-IT It only doesn't make sense if you pretend that I am not partially joking. Use whatever Distro you want. Also I really like Blue. So to me Blue is the best colour for me.