This is a full NixOS installation guide, from live cd to a working OS.
Once done, you will be left with a complete system, that uses my configuration.
This installation will push to use flakes out of the box, configuration.nix will
only be needed to add support for flakes and rebuild.
## Live ISO
This assumes you've chosen one of the ISO images with a graphical installer, and
followed though with the installation, getting you to a basic NixOS installation.
During this installation, make sure you allow non-free programs, and in the desktop environment selection, pick the option without any DE, we'll get to install that ourselves.
## Set up configuration.nix
First thing you'll need to do is to make your useer account own the
`/etc/nixos` directory. You'll want to do this to allow you to easily manage
your config with git (which is a requirement when using flakes). You can use
system wide git, however it is much more convenient to just leave it to the
user, as you'll have your git configuration there.
```sh
cd /etc/nixos
sudo chmod -R itsdrike:users .
```
Out of the box, NixOS only comes with `nano` editor, so we'll have to use that to edit the `configuration.nix` for the first time.
```sh
nano configuration.nix
```
In there, change the `environment.systemPackages = with pkgs; [];` like, and include `git` and `vim`.
After that, let's enable flakes, by adding the following at the end of your `configuration.nix` (but still within the function body - before the last `}`):
```nix
nix = {
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
''
};
```
Now you can save the changes and rebuild the system:
```sh
sudo nixos-rebuild switch
```
## Set up flakes
Now, since a git repository is required for flakes, let's set up git: