---
title: Frequently asked questions (FAQ)
---
= Frequently asked questions (FAQ)
:devos-example-commit: 580fc57ffaaf9cf3a582372235759dccfe44ac92

More like "Most anticipated questions (MAQ)" since almost no one asked me about this yet. :)
However, it doesn't roll off the tongue.

[qanda]
I'm new to Nix and NixOS, where should I start?::
Oh no, you've seen the multiple configurations from other systems, didn't you?
+
--
I hope you're ready for some time understanding because the learning curve is steeper than the wikipedia:Troll_Wall[Troll Wall].
I've written link:https://www.foodogsquared.one/posts/2020-11-06-moving-into-nixos/[a blog post regarding my experience with Nix] (and eventually link:https://www.foodogsquared.one/posts/2023-02-26-my-experience-managing-a-cloud-hosted-server-with-nixos/[a follow-up for managing a server with NixOS]) with a bunch of links for getting started.
Fortunately footnote:[Or unfortunately from a different perspective.], it is mostly the same experience now that I've revisited it.
(That said, Nix Pills is getting better!)

For a more practical start, I recommend to look into several configurations to see the general gist of configuration with Nix.
Here's a few I personally dug into:

* github:divnix/digga[rev={devos-example-commit}, path=examples/devos]
* github:hlissner/dotfiles[]
* github:thiagokokada/nix-configs[]
--

Should I use NixOS?::
I feel like link:https://github.com/hlissner/dotfiles/blob/5ea10e188354d096566a364016fbd28ec38dbe07/README.md#frequently-asked-questions[this answer is enough] but I'll give my take on it regardless.
+
--
If you are looking forward to debugging your configuration which consists of finding multiple sources from the manuals from the website, reading the source code from the appropriate point in github:NixOS/nixpkgs/[opts=repo], and repeatedly testing your NixOS configurations with each change then this is for you.

Entering the Nix ecosystem at the beginning requires high level of engagement to learn the ropes even if your only intention is to create a basic reproducible operating system ala-Ansible.

* You'll encounter vague and unique errors as the likes of NixOS is a unique world (the infamous infinite recursion, anyone?).
* You'll appreciate technical writers as the documentation department is lacking.
* You'll read outdated unofficial guides, resources, and the source code as you dive deeper into Nix.
* You'll get used to the unfortunate UX that is the toolings around Nix (even the revised Nix CLI has its problems).

There's nothing better with NixOS than the (un)official NixOS experience™.

Once you passed the initial curve and the difficulties that come with Nix, the benefits are immense.

* Using Nix beyond package management.
** As a universal build system due to its ability to install and integrate multiple versions of the same program without problems and decent support for different projects use cases (i.e., programming languages, build systems).
** As a link:https://virtualenv.pypa.io/[virtualenv]-like environment useful for managing development environments.
** As a way to manage clusters and infrastructure (i.e., link:https://nixos.org/[NixOS] for your installations, github:NixOS/nixops[opts=repo] for deployment, github:NixOS/hydra[opts=repo] for continuous integration).

* You can make use of Nix's large ecosystem of packages and tools from nixpkgs and beyond.

* It is easier to distribute and verify your builds as Nix also has toolings available for those purposes. footnote:[Though, other packaging formats also has those but for Nix, reproducibility is one of the focus.]

If you intend to use NixOS, I recommend to start small and install Nix on a non-NixOS distro and use it as a way to create reproducible development environment, be familiar to its build process (I recommend reading link:https://nixos.org/guides/nix-pills[Nix Pills] to get started), get intimate with systemd, and then test NixOS in a virtual machine.
--

Any requirements for this setup?::
You only need Nix 2.6 installed with the experimental features for Nix command and flakes enabled (i.e., `experimental-features = nix-command flakes`).

Hey! I have an error something like `/nix/${HASH}-nmd/` from my installation. Why it doesn't work?::
This error seems to be related to home-manager.
See the issue at github:nix-community/home-manager[issue=2074] for more details.
Basically, you have to add `--impure` flag when running `nixos-install`.

What is my experience on Nix flakes?::
link:https://youtu.be/iWJKZK_1l88[I LIKE IT!]
There are still some hiccups like the strict tie-in to Git which leads to strange experience like having to add untracked files just to be recognized.
However, this feature is still in the works so no surprise there.
+
--
With that said, it is workable to be a daily part of the NixOS experience especially with the benefits of Nix flakes.

* More user-friendly compared to Nix channels.
* Just one reference file to know what is being exported from a project.
* Unification with commonly-agreed schemas.

This feature somewhat helped me understand more about the Nix language, oddly.
I guess those lightbulb moments can come from random places.
--

Is this based from link:{devos-link}[devos]?::
Yes but I've created this from scratch.
One of my goals when creating this config is to use as little dependency as much as possible and to understand more what's going under the hood with Nix.
At the time I've rewritten this configuration, I have little idea about Nix as a language and I find devos to be overwhelming so I doubled down to create from scratch.
+
However, I can say that my configuration is moving in a similar direction to devos (which is intended to be modified anyways) as I explore more of Nix.
In fact, I've based much of my config from it and may even be ended up as one.
It is nice that such a project exists serving as a reference for bigger configurations.

What's up with some error regarding something in restricted mode?::
If you found some error regarding something in restricted mode, you can run the installation with `--impure` flag (i.e., `nixos-install --impure --flake {canonical_flake_url}#ni`).
