What should I do before installing NixOS


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.

#!/usr/bin/env groovy
        @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+') {
    if (it.size() != 4) {
    } else {
      String[] used = it[3].split(',')
      for (String u : used) {
Graphviz.fromGraph(g).render(Format.PNG).toFile(new File("lsmod.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.

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.


following the manual mostly worked fine for me:


This might also be an option:

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


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!

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

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.

1 Like

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

Thanks for all the help!