# What should I do before installing NixOS

**URL:** https://discourse.nixos.org/t/what-should-i-do-before-installing-nixos/7289
**Category:** Help
**Created:** [May 20, 2020, 2:48am UTC](https://discourse.nixos.org/t/what-should-i-do-before-installing-nixos/7289 "2020-05-20T02:48:09Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![moaxcp](https://discourse.nixos.org/user_avatar/discourse.nixos.org/moaxcp/32/1601_2.png) [@moaxcp](https://discourse.nixos.org/u/moaxcp)
#### Post date: [May 20, 2020, 2:48am UTC](https://discourse.nixos.org/t/what-should-i-do-before-installing-nixos/7289/1 "2020-05-20T02:48:09Z")

</div>

Hello,

I just bought a new dell xps 13 with Ubuntu. This is an interesting situation since I can see how it is installed and maybe gather some info before switching to nixos. Is there anything I can do to make sure I install NixOS correctly?

I though maybe I could record the results of lsmod and figure out how to get the modules installed and I ended up writing a small script to show mods and their dependencies in graphviz.

```auto
#!/usr/bin/env groovy
@Grapes(
        @Grab(group='guru.nidi', module='graphviz-java', version='0.16.0')
)
import guru.nidi.graphviz.attribute.*
import guru.nidi.graphviz.model.*
import guru.nidi.graphviz.engine.*
import static guru.nidi.graphviz.attribute.Rank.*
import static guru.nidi.graphviz.attribute.Rank.RankDir.*
import static guru.nidi.graphviz.model.Factory.*
MutableGraph g = mutGraph('mod dependencies').setDirected(true).use { gr, ctx ->
  String lsmod = 'lsmod'.execute().text
  lsmod.takeAfter('\n').splitEachLine('\\s+') {
    graphAttrs().add(dir(LEFT_TO_RIGHT))
    if (it.size() != 4) {
      mutNode(it[0])
    } else {
      String[] used = it[3].split(',')
      for (String u : used) {
        mutNode(it[0]).addLink(mutNode(u))
      }
    }
  }
}
Graphviz.fromGraph(g).render(Format.PNG).toFile(new File("lsmod.png"))

```

 ![ex](https://discourse.nixos.org/uploads/default/original/2X/f/f6dbd51d27d5b4b056302bdcbd506fd7d7d909e1.png)

I also tried looking at the linux config but it doesn’t appear to be available. It looks like to view it I need to install a module which is not available on my system. Is this important? I just want to make sure I have all the right settings for NixOS.

---

<div class="post-metadata">

### Author: ![ElvishJerricco](https://discourse.nixos.org/user_avatar/discourse.nixos.org/elvishjerricco/32/984_2.png) [@ElvishJerricco](https://discourse.nixos.org/u/ElvishJerricco)
#### Post date: [May 20, 2020, 3:22am UTC](https://discourse.nixos.org/t/what-should-i-do-before-installing-nixos/7289/2 "2020-05-20T03:22:20Z")

</div>

> I also tried looking at the linux config but it doesn’t appear to be available.

I think what you’re looking for can be found at `/proc/config.gz`.

I sincerely doubt you’ll need to mess with kernel modules. I’d try installing NixOS in a VM at least once just to make sure you’ve got the basics right (nixos-generate-config, configuration.nix, etc.). Then the process will likely be essentially the same on the real computer. NixOS doesn’t really give you a lot of trouble when installing it; probably the trickiest part is simply disk partitioning/mounting, but that’s about the same as any other distro that makes you do it manually.

`nixos-generate-config` will create a `hardware-configuration.nix` file that does some heavy lifting for you, like setting up file system mounting and enabling some kernel modules that’ll be needed for booting. From there, the standard NixOS install does most of the work. Just configure a user and enable your choice of desktop environment in `configuration.nix`, maybe set `services.xserver.videoDrivers`, and you’re probably pretty much good to go.

---

<div class="post-metadata">

### Author: ![xgusch](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/x/a87d85/32.png) [@xgusch](https://discourse.nixos.org/u/xgusch)
#### Post date: [May 20, 2020, 3:19pm UTC](https://discourse.nixos.org/t/what-should-i-do-before-installing-nixos/7289/3 "2020-05-20T15:19:44Z")

</div>

following the manual mostly worked fine for me:

> **[NixOS 23.11 manual | Nix & NixOS](https://nixos.org/manual/nixos/stable/)**
>
> Nix is a tool that takes a unique approach to package management and system configuration. Learn how to make reproducible, declarative and reliable systems.

> **[NixOS 23.11 manual | Nix & NixOS](https://nixos.org/manual/nixos/stable/index.html)**
>
> Nix is a tool that takes a unique approach to package management and system configuration. Learn how to make reproducible, declarative and reliable systems.

This might also be an option:

> **[GitHub - jeaye/nixos-in-place: Install NixOS on top of any existing Linux...](https://github.com/jeaye/nixos-in-place)**
>
> Install NixOS on top of any existing Linux distribution without rebooting - GitHub - jeaye/nixos-in-place: Install NixOS on top of any existing Linux distribution without rebooting

I never tried it myself but I did an in place installation with Linux Mint. I think that I had followed this guide:

> **[On Replacing Ubuntu with NixOS (part 1)](https://stesie.github.io/2016/08/nixos-pt1)**
>
> This is my personal collection of random musings, related to stuff I am interested in ... that is web-related development, Software Craft, Docker, Continuous Integration, ...

It looks like your already familiar with Linux as an OS, so I don’t think that the technical details will scare you. As far as I have seen a Calamares based installer has been rejected by the project.

Your Dell is quite a new device. I don’t know whether this might show some trouble. Happy installation!

---

<div class="post-metadata">

### Author: ![DavHau](https://discourse.nixos.org/user_avatar/discourse.nixos.org/davhau/32/2324_2.png) [@DavHau](https://discourse.nixos.org/u/DavHau)
#### Post date: [May 20, 2020, 3:58pm UTC](https://discourse.nixos.org/t/what-should-i-do-before-installing-nixos/7289/4 "2020-05-20T15:58:35Z")

</div>

I think nixos-in-place is unmaintained and outdated. Didn’t work for me the last time i tried. Better go with:

> **[GitHub - elitak/nixos-infect: \[GPLv3+\] install nixos over the existing OS in...](https://github.com/elitak/nixos-infect)**
>
> \[GPLv3+\] install nixos over the existing OS in a DigitalOcean droplet (and others with minor modifications) - GitHub - elitak/nixos-infect: \[GPLv3+\] install nixos over the existing OS in a DigitalO...

But for your own machine, it’s better to do a clean and proper installation. This infect stuff is for cloud environments where you have no other choice.

---

<div class="post-metadata">

### Author: ![moaxcp](https://discourse.nixos.org/user_avatar/discourse.nixos.org/moaxcp/32/1601_2.png) [@moaxcp](https://discourse.nixos.org/u/moaxcp)
#### Post date: [May 21, 2020, 2:24am UTC](https://discourse.nixos.org/t/what-should-i-do-before-installing-nixos/7289/5 "2020-05-21T02:24:36Z")

</div>

Yes! `/proc/config.gz` does not exist. I found out that there is a module that enables this but it is not in the kernel that came with the computer. So I am going to look into how to install it on ubuntu and load it.

I have been using NixOS for a few years now. My old computer is almost 10 years old so this is a nice upgrade.

I came up with a list of things I want to check before the switch.

- modules currently in use
- find grub options passed into the kernel
- find linux config used so I can add the same options to nix
- add dell diagnostics as grub entry (just in case)
- contribute to [nixos-hardware](https://github.com/NixOS/nixos-hardware/tree/master/dell/xps)

Thanks for all the help!
