pull down to refresh

I've seen a couple of "NixOS is hard" comments now, and so I wanted to make a guide for those people who aren't developers.
You see, NixOS actually has some pretty good tooling that makes it as easy as Linux Mint. The documentation around it though is geared towards developers. Developing a program is hard. The Nix configuration file runs in a statically typed programming language. In order to build your own flake you need to know this programming language, but to take advantage of the 80k+ packages already put together, you can actually just be a normal user. Maybe my next guide will gear towards WSL (or running nix programs on windows), but for now, this is how to install NixOS on bare metal.
Assumptions: You currently use a Windows computer You want to install NixOS on a dedicated computer You want to run the Cinnamon desktop environment You don't want to even look at the contents of /env/nixos/configuration.nix
We start as most OS installs start. With a USB flash drive (at least 3GBs or larger), the iso file, and rufus.
Rufus is the program that will install your NixOS image file to your USB and make it into a magical bootable USB.
You can install Rufus here: https://rufus.ie/en/
Next, the iso file. This file is the entire operating system. It will be written to your USB flash drive. You can download it here: https://nixos.org/download#nixos-iso and if you're still lost, I'll even give you a direct link with no confusing options to choose from here: https://channels.nixos.org/nixos-23.11/latest-nixos-plasma5-x86_64-linux.iso
Once this file has completed its download, you will see it in your downloads folder. Now, with everything prepared, plug in your (empty!) USB. Know that everything on this drive will be no more when we're done so rescue any files you need now!
Be very familiar with the name of your USB drive when you plug it in. Run rufus.exe, select the name of your USB drive under "Device". If you are mistaken, your precious files on your other USB drives that may be plugged in at this time will be nuked from existence. Unplug any other USB devices you may have plugged in if you're unsure which drive might be the one you want to put the image onto!
Now, with everything prepared, press "Select". This can be tricky. If you press the arrow instead of the button you might get confused. A file explorer should pop up and if it doesn't it means you pressed the arrow. Just move your mouse closer to the left and click "Select"
Now, navigate to your downloads folder. You may have changed it from the default without remembering. If you go back to your browser and select "Downloads" or (chrome://downloads/ in the address bar of Chrome if you need the extra help), you can click "show in folder" and it'll show you exactly where the file is located. Just go back to rufus and try to find it from there.
Now with the iso file selected, the USB drive ready to go, press start! Your USB will explode and destroy everything you've ever known or loved on that poor drive and take on a brand new personality: NixOS
Anyway, when that loading bar is done, you can safely eject the USB and plug it into the computer you want to image.
Now, this part can be tricky. It involves gasp the BIOS. Sadly, its difficult to write a guide for this. Every motherboard BIOS is different. When you turn on the computer for the first time, there's usually some information there. "Press F12 for BIOS" "Press F2" "Press Esc" who knows which of these will take you to your BIOS. I can only recommend that you look up your computer make "Dell" and model "Optiplex" for example and research how to get into the BIOS.
Alternatively, you can spam "Esc" "F2" "F12" and "Del" until something happens. Really play around with it and try to get familiar with your BIOS. (Its probably F12 tho that will give you the most options and will allow you to then select the BIOS) You'll want to go find boot options and enable booting from USB, then save and exit and boot from your USB.
If anything so far could use further clarification, you can try this video tutorial instead, but just use the NixOS iso instead of Ubuntu: https://www.youtube.com/watch?v=Hic70IYR9i4
And you can always google "How to install Ubuntu on" and then the make and model of your computer and you'll probably find something useful.
Now we have the NixOS installer loaded up. You should already see a desktop environment and GUI window welcoming you to the NixOS installer. If that's not the case, and you're wondering which of two or more options to install instead, its the first one or you can wait and it will automatically select it and if you don't know what I'm talking about, you just see a desktop, don't worry about it you probably weren't paying attention to the menu I'm talking about and that's fine.
Here's a video about navigating this GUI: https://youtu.be/9fWrxmEYGAs?si=_diVsSKOtGdCNNZe&t=91
Its pretty quick. You can pretty much follow it step by step, but for our case, there's one thing we want to do differently. Whereas the person in the video selects "No Desktop" for this tutorial you should select "Cinnamon". This is because I don't use the other desktop environments and I don't know how to guide you if you use the other ones.
Now, with the computer rebooted, remove your USB (and probably restart again lol) you now have a desktop environment with a browser and everything. You can connect to the internet, surf the web and wait...how do you install programs? I know you're looking at me right now saying "You told me I could install programs without opening the configuration.nix file. Come on now out with it!" Alright alright fine.
For this next step you will have to open gasp THE TERMINAL. Its called "Terminal" in your start menu and you can even search for it by typing.
NOOO not the terminal! This was supposed to be for non-developers why are we installing the terminal! Well dear fellow, its because the program we need doesn't come pre-installed and we need the terminal to type one command. That's all just one command.
nix profile install github:snowfallorg/nix-software-center --extra-experimental-features nix-command --extra-experimental-features flakes
Its a long command for sure, but thankfully you can copy and paste it! All you gotta do is go to SN using firefox (which does come preinstalled) and come back to this guide first!
Just ignore this paragraph its for the developers out there, just want to give a quick shoutout. Hey guys, so I found this software store over here at this github page: https://github.com/snowfallorg/nix-software-center you can review the code and there's other installation instructions here too if you prefer them
With that out of the way, once this program has finished installing, go to your desktop. Right click somewhere empty and click "+ Create a new launcher here..." Go ahead, give it a name. Its original name is "Nix Software Center", but you don't have to name it that. Name it whatever you like.
In the next box to the right of "Command:", you have to type another command here, but hey you're not typing it in the terminal so technically it was still only one command that you had to type in the terminal. You can copy and paste the command into this box.
nix --extra-experimental-features "nix-command flakes" run github:snowfallorg/nix-software-center
Once you do that, click okay and it'll ask you if you want to add it to the menu also (that's the place where we typed terminal and got the terminal and where you can type what you named this thing too if you click yes) so click yes.
Go back to your desktop and open that software center you just installed. It might have a menu that asks you for the location of your configuration file. Just click the box, look for configuration.nix and select, click continue and experience the magic.
If you don't like my instructions, here's some other instructions you can follow instead: https://www.youtube.com/watch?v=mjG2d6kEXUg
Welcome to NixOS. Enjoy the 80k+ programs and welcome to your new computer.
Going to give this a shot hopefully my laptop don’t brick after trying
reply
Tell us how it goes!
reply
I'm sure it can be done but why choose a hard life?
I messed around with NixOS in a VM and it was way more trouble than it's worth for someone like me who needs a OS for just browsing and documents.
reply
Ha, thats pretty much all i'm using it for now,
But I have big dream I tell you, big dreams!
reply
^Guy who didn't read the guide
Not only is there a browser that comes pre-installed in the GUI installer mentioned in this guide, but also:
There's a GUI software store in this guide and you don't install it by opening a configuration file.
reply