I did the graphical install, and set allow unFree to true. Following the recommended introductory videos I installed home manger. Tried to install vscode. Disallowed because it is unfree code. Spent hours trying to work out why and where the clashing settings are. All the ‘advice’ assumes you know where all the configuration expressions are within the file system. Man - if I set a global option - I don’t want it lying to me. No excuses - that’s bad design.
@@petergoodall6258i may not be the target audience really, but global probably means - no matter what you do inside the typical nix dialect. not outside in this case. this would make sense given its a language itself aswell.
Just getting into this. Thanks for the guide. One bit of feedback that I think should have been in the video is that it's very useful to learn `nix-shell` right away. For example, I don't like nano and would rather have micro or better yet neovim to edit the configuration. I can do this with `$ nix-shell -p neovim` which installs the package on a temporary shell. I did this and it felt really nice. The packages used this way are gone as soon as the shell is closed which lets you use your package(s) of choice before it's installed the right way with the configuration file. This is good for also testing stuff you don't plan to keep that would otherwise clutter up your system or need you to use something like Docker to do the same thing. In fact I would consider it very similar to that in how it containerizes the packages in a shell but I'm not an expert on that technology so I'm sure there's differences.
As a Debian user I never was that much interested in distro hopping, but I think I will give NixOS. Thanks for giving it some visibility! Greetings from Switzerland
Yes indeed. More please, that was very clear. As a user of 7 systems (multiple locations for work) I would really appreciate more info on this 'reproduceable' thing everyone goes on about. Can I really just 'reproduce' the entire system to a new machine? For me installing a new system and it's packages is easy - I have it all in a script. It's all those little tweaks I make to Gnome and all the customisations in the packages that I run that take ages to get right each time. "dd if=machine1 of=machine2" ?? Surely not?!!
this video was just awesome! subscribed first of all i got this video recommended because i skate and was watching the berrics and then this video got recommended saying that you quoted their skatepark (?) then i started watching it and found how this OS is just awesome. im a developer that loves linux and this is my first time seeing this OS. will try it ASAP keep up the good work!
I'm keep hearing about nix all the time and was confused of why language would be deployable as docker image :) Now it's clearer, thanks! Now I want to explore it at least a bit.
I remember tryign this out a while back. Loved how it makes it pretty easy to just share your config so someone else can have their system built just like yours. Forgot what the reason was that made me go back to arch but might give this a check again soon.
@@vimjoyer Probably going to give it a try again soon when I get some time. It's interesting to see how there seems to be a lot of packages now, hopefully it has most of the stuff I usually use. The aur is just a bit hard to part with :/
@@thatguynar hyprland and some more wayland stuff was added to repos recently, and many of my favourite cli tools are also there. Even if you don't find anything, it's quite easy to package stuff yourself.
@@vimjoyer does window managers require real hardware,, im on minimal install nix in wsl atm.. i want to configure my sistem independent from windows atm.. so i can later switch over... virtualbox always so sluggish... i assume since its pratically headless , i could conf anything besides the window manager
just started using NixOS. my approach is leverage flakes and home-manager for everything. trying to avoid doing things the "old way" like channels, etc. thx for the videos!
Thank you for your guides. They are essential and more straightforward than the official documentation. Your videos make NixOS super easy to learn and to me it feels like it is the easiest distribution of them all, after learning how to configure it properly.
Coming back a week later the GUI installer for NixOS has a few flaws. 1. It won't configure any filesystem other than ext4. 2. Even if you partition it yourself with gparted, which in in the installation system, it won't accept it. Neither with doing it with CLI tools like fdisk, gparted or parted. 3. If you try to use the manual method within Calemares, the installation tool, it will brick the system and won't let you boot after installation. Part of it could be that you can't create the small 1Mb or less of empty space at the beginning of the drive for alignment purposes. Because of these issues I just used the GUI installer for a bit before learning how to install things with the minimal installer. Although you might still want to use the GUI installer and just do everything from the terminal since that way you have access to a browser and can copy and paste things a lot easier. With using the preconfigured option that the GUI installer gives you I was able to have an example of what the configuration looked like with the desktop installed and stuff which helped me know how to configure stuff from tty or terminal only. While not as good as the Arch installation guide the NixOS one on their wiki is good enough to get you started.
would love to see a video where you config like bspwm or hyprland and rice it a bit, also more info about how dependencies work would be nice cause generally on arch dependencies are installed automatically
Dependencies are mainly auto installed aswell. The best part is that you can have many versions of the same program in parallel. For example, if you are using program A, that requires gcc 1.3 but you are also using program B, that requires gcc 1.5, nothing to worry! Both programs will be installed and linked to the program that needs them. So program A will use gcc 1.3 and program B will use gcc 1.5 :)
@@adriabruicortes490you are right but I dunno I got confused or stuck at flakes and the home manager? What do you use? Any guide for beginners that's great for me thanks
You can try NixOS out in a VM, or install nix (package manager) + home manager on Manjaro, to get 1 file for all settings, although only for user programs.
Thanks for the video. I'm currently using Zorin OS 17, but have used Manjaro previously, but had to change to Zorin as my new work laptop has Secure Boot enabled (for Windows 11 and some proprietary apps that require Secure Boot). Does NixOS play well with Secure Boot? I switched to Zorin as it's Secure Boot friendly and Manjaro Wouldn't even install.
Everything in your root directory is managed by your configuration file, so each time you rebuild your system you kinda get a new immutable system. So you are not really changing anything, just switching gloves and throwing away old ones. Edit: typo
The thing that no-one talks about with NixOS is that in order to keep your builds reproducible across systems, you MUST edit the configuration files (i.e. no `nix-env -iA` to install packages - it doesn't persist). This means working with settings overriding each other and sometimes confusing situations trying to find a certain option for a certain package. My config is pretty simple - just Home Manager, a couple of packages like Neovim and zsh, all inside of a Flake - yet I still get lost in my own code because of the abstractness of the Nix language. There are solutions and tools for these problems of course, `lib.mkDefault` and grep go a long way, but it kinda gives me Neovim/Lua vibes in the sense that once your config gets even a little big, things get really confusing if you dont obsess over "clean code" and triple-check everything so you get the intended effect. I definitely love using NixOS so far, and will continue to use it in future projects, but I have to say its not the best OS for everyday use. Unless you like tinkering with configs until its just right 👍
"just Home Manager, a couple of packages like Neovim and zsh, all inside of a Flake" Sounds like the kind of basic setup I am looking for to get to start out with NixOS. On the less basic side of things, I wanted to get lazy.nvim package manager to work, which makes for a trickier setup for Nix. Especially if you want a particular set of Neovim plugins to be included in your nix config. Turns out people have written a separate configuration system for that: nixvim. I considered using this one, but it seems a bit too advanced to use right now without knowing the nix basics.
Yeah, I've seen that one too. Lua configured nvim usually doesn't have many external dependencies though, and all your language servers can be installed with mason/project's flake.
wish I had this tutorial when I was using nix. might try it out again with this guide! thanks a lot! hope this gets rid of a lot of unnecessary suffering that comes with this distro hahahaha
Its an awesome distro, I currently have their stable fixed release channel installed, and their unstable rolling release channel installed too, so I can boot into a fixed release, or reboot into a rolling release, how cool is that!
That looks awesome... but... how do you actually keep up to date with "os level" packages' configurations like for example when distros moved to PipeWire from Pulse... and Idk, maybe at some point in time systemd or networkmanager or any of the thousands of "base packages" get deprecated... do you have to manually check each update and apply modifications to the config file you got at the point in time you made the install and further customizations?
Nixos has big updates every 6 month in stable channel, and is rolling release on unstable. Some of the important stuff will probably be added as enabled by default, other you need to enable yourself. Anyway, if you use flakes, you could always get your system from exactly the same moment when the file was evaluated.
When you run nixos-rebuild, any deprecated configurations will be called out in an error message. You can then fix your config and try again until it works. In my three years of using NixOS, I've had to replace a few deprecated configurations, update the package name of a few packages, and so on, but nothing really difficult. The vast majority of options are stable, and most of the time I make changes to core settings is if there's a new and improved way of doing things that I want to opt in to (like switching from Pulse to PipeWire).
I would love a guide on configuring multiple machines effectively. My laptop will need a slightly different config than my desktop, and I am not sure what the optimal approach is for this. How can I let nix detect which machine I am running on and branch out based on the machine ?
This is where nixos shines, you can just make multiple small configuration files with slightly different options, and store everything else in modules. Both files can import modules with their required options, and you can even define custom options in those modules.
@@vimjoyer Thank you! After watchig your videos about flakes I was able to write a flake for each of my devices and it works perfectly :O this feels like some voodoo magic
It doesn't update the versions of the packages? How so, what if there's a security fix, for example? So the package would get updated, but the PC the package is installed on won't receive the update? That's pretty bad for the security of the whole thing. Another major thing I'm confused about is how the built apps are being treated in the system. If you're on Linux and are a poweruser, you will always discover some app to build at some point. As far as I understand, the whole building thing is against NixOS's philosophy, but what if I would really need to?
Actually, proprietary software is likely super easy; Guix has flatpak. Meanwhile, over in Nix land: -bash-5.1$ nix search neovim error: experimental Nix feature 'nix-command' is disabled; use '--extra-experimental-features nix-command' to override -bash-5.1$ nix --extra-experimental-features nix-command search neovim error: experimental Nix feature 'flakes' is disabled; use '--extra-experimental-features flakes' to override -bash-5.1$ nix --extra-experimental-features nix-command --extra-experimental-features flakes search neovim error: cannot find flake 'flake:neovim' in the flake registries What's a flake? Why can I no longer search for packages? (Turns out it's maybe something similar to channels, I had to put "search nixpkgs neovim", but I still don't know e.g. how to list them, and the search command takes forever.)
A ton of pros, some cons. The comment would be enormous, so I recommend just checking some article, or wait until I make some more episodes in nix tutorial series.
Couldn't I just create a shell script to install packages like with NIXOS? With traditional distros I have more options. I could use a shell script or the lone package manager to install packages
You can use a complicated shell script, but it's easier to use a ready-made, tested and popular solution. Also nix package manager is available on other distros, and I highly recommend trying it.
Oracle also basically ripped off Red Hat and just tweaked the kernel a bit, I swear that company has more lawyers than engineers these days and that’s what’s kept them afloat.
Maybe I'm missing something, but the problems with switching between KDE and GNOME are due to the user home configuration files. How would nixos help in that respect? It won't change user configuration files, will it?
first question I had after seeing you install vim was "how do I know when a new version of vim is out? does Nix have a service that notifies me and then I have to nixos-rebuild again?". But curious how this actually works when using Nix as a desktop.
Rebuilding NixOS does not update it, updating is done with flakes or channels. You can check package versions on the nixos search org website, and there are special tools that allow you to see which tools received new versions after update
Gaming on NixOS has been super smooth for me. I'm using wayland, and even then just adding some nvidia settings from the wiki was enough to play everything I wanted. League with lutris, Warframe on steam, also playing some Wow installed with plain wine.
@@vimjoyeragreed that there is only one true editor. Is there no way to install vim before doing editing in nixos or does it force you to commit heresy?
I was thinking of switching but the docs is almost nonexistant and i feel like a distro that is imperative but uses the packaging like nix would be good enough as you can still restore the system and do everything and do not need to be a programmer to learn the awful language that is nix
You can still use NixOS imperatively, there's just not much point in doing so. Anyways i made this video to increase amount of resources about nix on the internet. I'll probably do a couple more about flakes, home-manager, nix shell and if I'm not too lazy even nix-index nix-ld and other tools.
@@vimjoyer Why is there no point, you get everything except the declaritive aspect Multiple versions of packages can exist You could rollback easily as well Only issue is with configuration, as its meant to be done using nix
@@alexstone691 It is possible, you are free to use your system however you want. You could even use nix package manager standalone on other distro just to get those 80000 packages. I just find the declarative approach to be even simpler then imperative one. The main issue is lack of documentation, and that's a fact. I'll try to make it simpler for people to grasp the concept, and maybe someone will like it too.
i don't really understand the reason to use nix over guix other than the fact that nix is more popular. is the nix language really as powerful as guile scheme?
I don't know about "powerful", but the Nix language is certainly more complicated, less well documented, and less general (Scheme is used in many other places, e.g. Siag). The Guix system distribution also takes a more active stance against non-free software such as firmware blobs, which leads to some discomfort. It's a considerable contrast between Debian's sorting non-free firmware under non-free and software requiring on it under contrib, and Guix and linux-libre mangling the drivers to make it harder to find out how they're broken (offended by the difference between "non-free firmware X was removed" and "no free firmware exists"). Notably, both nix and guix (the package managers) are available in both Debian and Guix (the distributions). At a quick glance NixOS seems to have two support packages but not guix itself. I have at least two machines running nix, but it's not really comfortable with features like package search disappearing behind muddled changes.
@@0LoneTech glad there isn't much about nix i was missing then. guix seems like it would be the better solution for me once i have the time to transition to a declarative package manager as i already have some scheme experience and run linux-libre already anyways. nix seems very cool though if you aren't sold on the whole "put a lisp in everything" thing like i am
Nixos could not be any less similar even to your regular Linux distro, it's not even FHS compliant. This channel is more about desktop open source operating systems (Linux primarily), so I'm not familiar with the ones you named, sorry.
@@vimjoyer Секрет того хто хостить мірор арчу в Україні все ще не закритий(. Я просто десь пів року назад дивився на всі мірори і прифігів швидкості мірору від Arch який в Україні хоститься. Знайшов твій відос, побачив що в тебе Укр локали, думав що вирішив цю загадку) а получається що нє