# How to start using Nix(OS)

**URL:** https://discourse.nixos.org/t/how-to-start-using-nix-os/37804
**Category:** Help
**Created:** [January 5, 2024, 7:05am UTC](https://discourse.nixos.org/t/how-to-start-using-nix-os/37804 "2024-01-05T07:05:21Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![RudiOnTheAir](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rudiontheair/32/12450_2.png) [@RudiOnTheAir](https://discourse.nixos.org/u/RudiOnTheAir)
#### Post date: [January 5, 2024, 7:05am UTC](https://discourse.nixos.org/t/how-to-start-using-nix-os/37804/1 "2024-01-05T07:05:21Z")

</div>

Hello everyone  
I’m currently using void linux, but there are no packages for some programs. And sometimes it would be easier if systemd was also supported… Now I’ve tested NixOS in a VM and have everything running in classic mode. This is great in conjunction with the packages via [NixOS Search](https://search.nixos.org/packages). Now I wanted to roll it out on my computers, but then I read that everything is in the process of being converted to flakes…

To be honest. What is most important to me is an extensive package store, like the AUR. Fewer functions that you can go back to old versions. So far I have copied the files from .config/ etc. when migrating to new computers, which is also ok.

Anyway, what’s the best way? Waiting for a release with integrated, unified flakes support, or what is the best method? I’ve read a lot of documentaries, watched a lot of VT videos, and the “solutions” are different everywhere. That doesn’t make it any easier.

Who can advise me?

Thank you.

---

<div class="post-metadata">

### Author: ![rhendric](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rhendric/32/5699_2.png) [@rhendric](https://discourse.nixos.org/u/rhendric)
#### Post date: [January 5, 2024, 8:12am UTC](https://discourse.nixos.org/t/how-to-start-using-nix-os/37804/2 "2024-01-05T08:12:29Z")

</div>

My two cents:

Don’t worry about flakes. The home user giving NixOS a try doesn’t need them, and they’ve been experimental for years with no hint that stabilization won’t take longer. People in Nix shops, who have an interest in making sure that the entire dev team runs everything on exactly the same software that gets deployed and not something that depends on something that is one minor version off, have the sorts of problems flakes are best at solving. You probably don’t.

Follow the [NixOS Manual’s installation guide](https://nixos.org/manual/nixos/stable/#ch-installation), and then the [Home Manager installation guide for NixOS](https://nix-community.github.io/home-manager/index.xhtml#sec-install-nixos-module) if you don’t want to use sudo to configure your user’s programs from `/etc/nixos/configuration.nix`. Don’t use `nix-env` to install anything; use `nix-shell -p` to try programs in a temporary way, and then use `home-manager edit` (or `sudoedit /etc/nixos/configuration.nix` if you didn’t go with Home Manager) to add them to your profile in a less temporary way. That’s the least confusing way to get started.

---

<div class="post-metadata">

### Author: ![RudiOnTheAir](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rudiontheair/32/12450_2.png) [@RudiOnTheAir](https://discourse.nixos.org/u/RudiOnTheAir)
#### Post date: [January 5, 2024, 8:22am UTC](https://discourse.nixos.org/t/how-to-start-using-nix-os/37804/3 "2024-01-05T08:22:06Z")

</div>

So far I have done this by entering everything in /etc/nixos/configuration.nix. But it would be stupid if in a few months this route no longer works by default in a new ISO.

---

<div class="post-metadata">

### Author: ![rhendric](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rhendric/32/5699_2.png) [@rhendric](https://discourse.nixos.org/u/rhendric)
#### Post date: [January 5, 2024, 8:24am UTC](https://discourse.nixos.org/t/how-to-start-using-nix-os/37804/4 "2024-01-05T08:24:53Z")

</div>

That won’t happen for the foreseeable future. We’re likely years from flakes being enabled by default; Nix might not ever see the day when non-flakes configurations are no longer supported.

---

<div class="post-metadata">

### Author: ![RudiOnTheAir](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rudiontheair/32/12450_2.png) [@RudiOnTheAir](https://discourse.nixos.org/u/RudiOnTheAir)
#### Post date: [January 5, 2024, 8:47am UTC](https://discourse.nixos.org/t/how-to-start-using-nix-os/37804/5 "2024-01-05T08:47:59Z")

</div>

Of course, it is important that the selection of packages does not become less and less. Even with proprietary software such as Teamviewer, Whatsapp for Linux or MS Teams… what is sometimes needed…

---

<div class="post-metadata">

### Author: ![rhendric](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rhendric/32/5699_2.png) [@rhendric](https://discourse.nixos.org/u/rhendric)
#### Post date: [January 5, 2024, 8:53am UTC](https://discourse.nixos.org/t/how-to-start-using-nix-os/37804/6 "2024-01-05T08:53:02Z")

</div>

Mate, you’re overthinking this! The availability of packages in Nixpkgs doesn’t change whether you’re getting them from a flake or not.

I suppose the one sense in which it matters is that a project might define a `flake.nix` file _in its own repository_, and it’ll be easier to understand installing that package from a configuration that is already using flakes. But of course proprietary software isn’t doing this.

Nixpkgs can be used with or without flakes, and Nixpkgs is the default collection of packages that has the hundreds of thousands of entries that you’ve probably seen boasted about here and there.

---

<div class="post-metadata">

### Author: ![RudiOnTheAir](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rudiontheair/32/12450_2.png) [@RudiOnTheAir](https://discourse.nixos.org/u/RudiOnTheAir)
#### Post date: [January 5, 2024, 9:05am UTC](https://discourse.nixos.org/t/how-to-start-using-nix-os/37804/7 "2024-01-05T09:05:20Z")

</div>

OK, I understood that flakes and home managers should be seen as one unit. I currently don’t have a home manager installed in the VM. Then I just want to let it happen. I have already successfully restored my program settings in the VM. Then nothing can go wrong…

Many thanks

BTW. Just one thing. For example the package “rustdesk” is at version 1.2.2. But the latest stable release is 1.2.3. Should i simply wait for it, or can i support the nix project by creating a newer package, if i know how to do this of course…??

---

<div class="post-metadata">

### Author: ![abathur](https://discourse.nixos.org/user_avatar/discourse.nixos.org/abathur/32/2719_2.png) [@abathur](https://discourse.nixos.org/u/abathur)
#### Post date: [January 5, 2024, 2:16pm UTC](https://discourse.nixos.org/t/how-to-start-using-nix-os/37804/8 "2024-01-05T14:16:15Z")

</div>

> [@RudiOnTheAir](#):
>
> BTW. Just one thing. For example the package “rustdesk” is at version 1.2.2. But the latest stable release is 1.2.3. Should i simply wait for it, or can i support the nix project by creating a newer package, if i know how to do this of course…??

You can open a PR to bump the package version. If you’re lucky, you’ll just be changing the version and the hash. (If you’re less lucky, changes to the package may require adjusting the expression that builds it.)

If you do, it’s a good idea to search all pull requests on [GitHub - NixOS/nixpkgs: Nix Packages collection & NixOS](http://github.com/nixos/nixpkgs) to make sure someone hasn’t already opened a PR for it. (This is especially true if you’re using a stable channel of nixpkgs, such as 23.11–the package may have already been updated in master.)

That said, there is a bot that automatically opens bump PRs for many packages as long as it can tell there’s a newer release, and bumping the version+hash is enough to get it building. If the release is very new (maybe the past week or so), it’s pragmatic to wait and see if the bot handles it. You can also proactively check the bot’s logs ([Index of /log/](https://r.ryantm.com/log/)) to see if the bot has tried and failed to update it.

---

<div class="post-metadata">

### Author: ![fricklerhandwerk](https://discourse.nixos.org/user_avatar/discourse.nixos.org/fricklerhandwerk/32/2029_2.png) [@fricklerhandwerk](https://discourse.nixos.org/u/fricklerhandwerk)
#### Post date: [January 5, 2024, 5:06pm UTC](https://discourse.nixos.org/t/how-to-start-using-nix-os/37804/9 "2024-01-05T17:06:47Z")

</div>

> [@RudiOnTheAir](#):
>
> I read that everything is in the process of being converted to flakes…

Please provide sources for where you read that.

Here’s a (still incomplete and still unfinished) account on the state of affairs compiled by the documentation team:

- [Flakes — nix.dev documentation](https://nix.dev/concepts/flakes)
- [Frequently Asked Questions — nix.dev documentation](https://nix.dev/concepts/faq#why-are-flakes-controversial)

A recent blog post by @jade, despite a funny title, represents the situation quite close to reality: [Flakes aren't real and cannot hurt you: a guide to using Nix flakes the non-flake way - jade's www site](https://jade.fyi/blog/flakes-arent-real/) (I’d like to have more of that on nix.dev!)

> [@RudiOnTheAir](#):
>
> So far I have done this by entering everything in /etc/nixos/configuration.nix. But it would be stupid if in a few months this route no longer works by default in a new ISO.

Note that there is nothing special about `/etc/nixos/configuration.nix` except `nixos-rebuild` using that location by default. You can put your NixOS configuration anywhere you like and point `nixos-rebuild` to that file. The [module system](https://nixos.org/manual/nixos/unstable/#sec-writing-modules) in NixOS is not going anywhere. All you have to watch out for is pinning your sources so the package set you’re working off does not drift away inadvertently. There are [multiple options for pinning](https://nix.dev/reference/pinning-nixpkgs), including the tools mentioned in the the @jade’s blog post, but the principle is the same everywhere: specifying commits explicitly.

---

<div class="post-metadata">

### Author: ![tobiasBora](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/t/9de0a6/32.png) [@tobiasBora](https://discourse.nixos.org/u/tobiasBora)
#### Post date: [January 5, 2024, 5:39pm UTC](https://discourse.nixos.org/t/how-to-start-using-nix-os/37804/10 "2024-01-05T17:39:04Z")

</div>

I agree with others: flake is nothing special, you can start without, and if at some points you need it it’s just adding 5 lines in a new file. I like to see flake as mostly a convention to organize packages in a channels to be easily discoverable + add a simple way to pin dependencies, so your non-flake knowledge will still help with flake.

What I would recommend however if you go to NixOs is to enable nix-ld so that you do not need to worry when running binaries not made for nix (e.g. if you use npm, it can save you some trouble if you just want to follow tutorials).

If you want to add new packages in Nix, you might also like my tutorials here (sorry for this shamefull advertisement):

- [packaging - How to package my software in nix or write my own package derivation for nixpkgs - Unix & Linux Stack Exchange](https://unix.stackexchange.com/questions/717168/how-to-package-my-software-in-nix-or-write-my-own-package-derivation-for-nixpkgs)
- [Different methods to run a non-nixos executable on Nixos - Unix & Linux Stack Exchange](https://unix.stackexchange.com/questions/522822/different-methods-to-run-a-non-nixos-executable-on-nixos)

---

<div class="post-metadata">

### Author: ![RudiOnTheAir](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rudiontheair/32/12450_2.png) [@RudiOnTheAir](https://discourse.nixos.org/u/RudiOnTheAir)
#### Post date: [January 5, 2024, 6:06pm UTC](https://discourse.nixos.org/t/how-to-start-using-nix-os/37804/11 "2024-01-05T18:06:47Z")

</div>

Honestly i havn’t documented that and i’ve searched von nixos & flakes. So maybe thats the reason for that.

Would it be the best idea to change after running the iso setup to the unstable channel? The rustdesk package seems to be on unstable in the same version, if i’m right in looking on the [search.nixos.org](http://search.nixos.org) site unstable tab…

---

<div class="post-metadata">

### Author: ![RudiOnTheAir](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rudiontheair/32/12450_2.png) [@RudiOnTheAir](https://discourse.nixos.org/u/RudiOnTheAir)
#### Post date: [January 5, 2024, 6:12pm UTC](https://discourse.nixos.org/t/how-to-start-using-nix-os/37804/12 "2024-01-05T18:12:50Z")

</div>

> [@tobiasBora](#):
>
> What I would recommend however if you go to NixOs is to enable nix-ld

Thanks, i will read about that the next days.

> [@tobiasBora](#):
>
> (sorry for this shamefull advertisement):

Don’t worry… 😉 It needs more of that. And it would be best if everything is in a central location. A lot of information is often no longer up to date, or the user cannot judge whether this is the case.

---

<div class="post-metadata">

### Author: ![mars-monkey](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/m/c77e96/32.png) [@mars-monkey](https://discourse.nixos.org/u/mars-monkey)
#### Post date: [January 5, 2024, 6:21pm UTC](https://discourse.nixos.org/t/how-to-start-using-nix-os/37804/13 "2024-01-05T18:21:32Z")

</div>

As a new NixOS user as well (6 months) I use flakes and recommend them from my limited experience.

Here is the best guide that I have found:

> **[NixOS & Flakes Book | Home Page](https://nixos-and-flakes.thiscute.world/)**
>
> An unofficial and opinionated book for beginners

---

<div class="post-metadata">

### Author: ![RudiOnTheAir](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rudiontheair/32/12450_2.png) [@RudiOnTheAir](https://discourse.nixos.org/u/RudiOnTheAir)
#### Post date: [January 5, 2024, 6:31pm UTC](https://discourse.nixos.org/t/how-to-start-using-nix-os/37804/14 "2024-01-05T18:31:26Z")

</div>

> [@mars-monkey](#):
>
> Here is the best guide that I have found:

That i’ve already bookmarkt, but I was confused because after the section “Enabling Flakes Support” you are supposed to clear the configuration.nix, if I interpreted that correctly.

---

<div class="post-metadata">

### Author: ![mars-monkey](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/m/c77e96/32.png) [@mars-monkey](https://discourse.nixos.org/u/mars-monkey)
#### Post date: [January 5, 2024, 7:33pm UTC](https://discourse.nixos.org/t/how-to-start-using-nix-os/37804/15 "2024-01-05T19:33:51Z")

</div>

In the Enabling Flakes Support section, you add a line to your nix configuration to enable the experimental feature.

Then, you create a new file called flake.nix. This is in addition to your existing configuration.nix file.

Basically, the flake.nix is like the index.html or makefile of your nix configuration. It lists the inputs and outputs, both online and on your local machine.

So essentially, you create flake.nix with very similar parameters, and then tell it to look in configuration.nix for your system configuration. So it is in addition to configuration.nix, not overwriting it.

---

<div class="post-metadata">

### Author: ![tobiasBora](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/t/9de0a6/32.png) [@tobiasBora](https://discourse.nixos.org/u/tobiasBora)
#### Post date: [January 6, 2024, 4:01am UTC](https://discourse.nixos.org/t/how-to-start-using-nix-os/37804/16 "2024-01-06T04:01:22Z")

</div>

> [@RudiOnTheAir](#):
>
> It needs more of that. And it would be best if everything is in a central location

True. I plan to add it to nix.dev (which is a really nice website for official nix-related tutorials btw), I just need to find some time to add it.

---

<div class="post-metadata">

### Author: ![jade](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/j/a8b319/32.png) [@jade](https://discourse.nixos.org/u/jade)
#### Post date: [January 6, 2024, 12:53pm UTC](https://discourse.nixos.org/t/how-to-start-using-nix-os/37804/17 "2024-01-06T12:53:34Z")

</div>

> [@fricklerhandwerk](#):
>
> (I’d like to have more of that on nix.dev!)

This post is a license grant to take whatever you would like from that blog post, verbatim, to put it on nix.dev under the appropriate license

---

<div class="post-metadata">

### Author: ![RudiOnTheAir](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rudiontheair/32/12450_2.png) [@RudiOnTheAir](https://discourse.nixos.org/u/RudiOnTheAir)
#### Post date: [January 8, 2024, 10:29am UTC](https://discourse.nixos.org/t/how-to-start-using-nix-os/37804/18 "2024-01-08T10:29:48Z")

</div>

> [@mars-monkey](#):
>
> So essentially, you create flake.nix with very similar parameters, and then tell it to look in configuration.nix for your system configuration. So it is in addition to configuration.nix, not overwriting it.

OK, have setup my first baremetal system. And this is my running config, with added unstable channel. As u can see, there are all packages in. Should i better let only git stay and put the rest packages in another position if using flakes… (on the baremetal the configuration.nix is untouched)

[https://paste.simplylinux.ch/view/d7279cbb](https://paste.simplylinux.ch/view/d7279cbb)

---

<div class="post-metadata">

### Author: ![RudiOnTheAir](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rudiontheair/32/12450_2.png) [@RudiOnTheAir](https://discourse.nixos.org/u/RudiOnTheAir)
#### Post date: [January 9, 2024, 7:58am UTC](https://discourse.nixos.org/t/how-to-start-using-nix-os/37804/19 "2024-01-09T07:58:43Z")

</div>

> [@RudiOnTheAir](#):
>
> (on the baremetal the configuration.nix is untouched)

To be honest, I don’t know what to do next? I activated flakes with the one line and looked at a few templates for flakes.nix. The idea was that I activate flakes and then continue to test things on the side. But first the basic system has to run with the packages stored in my config so that I can work with the system.

Is there a flake.nix in which I can enter the packages. Preferably in the unstable version.

I like the rolling release idea and like having up-to-date programs, even if something breaks in one package or another.

As I said, I’m not a programmer, but I would like to use the wide range of current packages.

Thanks for specific tips…

---

<div class="post-metadata">

### Author: ![bowmanjd](https://discourse.nixos.org/user_avatar/discourse.nixos.org/bowmanjd/32/11323_2.png) [@bowmanjd](https://discourse.nixos.org/u/bowmanjd)
#### Post date: [January 9, 2024, 12:28pm UTC](https://discourse.nixos.org/t/how-to-start-using-nix-os/37804/20 "2024-01-09T12:28:32Z")

</div>

> [@RudiOnTheAir](#):
>
> To be honest, I don’t know what to do next?  
> …  
> I’m not a programmer, but I would like to use the wide range of current packages.

I am unable to see your flake currently, so unsure how to give you specific line-by-line advice. But I do hear you just wanting to get started, and it seems you have a preference for flakes.

Given this, I might suggest trying the same way I got started with NixOS: I looked at [Misterio77’s starter templates](https://github.com/Misterio77/nix-starter-configs) (the minimal one was a good start for me) and went from there. I would advise _reading everything_ as the comments and READMEs are important. Not saying I understood it all right away, just acknowledging how important it is to take the time to absorb the information.

Over time, I learn more about Nix and keep diverging significantly from those templates. But they were a good “scaffold” for getting started.

Nix is a programming language, so you will need to grow more and more comfortable with programming to sustainably manage a dynamic system or systems. That said, _you can do this_, just take your time, have some patience with yourself, and enjoy the struggle of learning a new thing!

Also underscoring what @mars-monkey noted: the “NixOS & Flakes Book” is excellent. Working through it myself.

[Next page](https://discourse.nixos.org/t/how-to-start-using-nix-os/37804.md?page=2)
