A Suggestion to Aid New Users

Hi all. I am new to NixOS but not to Linux. I am quite fascinated by the way NixOS works but I am a bit overwhelmed by the steep learning curve. If I may offer a humble suggestion to assist newbies like me:

Perhaps it would be a good idea to host on the NixOS GitHub page a repository containing a “cookbook” of configuration.nix files for various NixOS setups. These would be fairly well fleshed out and would allow new users to quickly stand up a NixOS setup with all of the basic needs attended to. This is similar to other distros that have “spins” or “flavors” but in this case is a set of vetted configs that can become the basis for personal configurations.

For example, I prefer to use i3-gaps as my window manager, but I don’t know what are all of the applications and utilities needed to get a completely usable install going. Yes, I should learn what is involved in doing that, but if I need a running system fairly quickly doing so in NixOS is currently a bit of an arduous process. It may also make NixOS more appealing to causal users if a base config can be easily selected as opposed to being created by hand.

Just a thought…


I do like this suggestion of maintaining some common configs.

I think people would have to step up to maintain those though, or ideally they’d be built out as VMs and use NixOS VM tests run by CI to ensure they do not break.

I also thought of making an i3-based config I’d publish, or perhaps even a “nixos-desktop” repo that shows pre-configured NixOS desktops with all the bells and whistles working for various desktop environments.

1 Like

I have most of my configuration in home-manager, you can look at my configuration here: GitHub - jonringer/nixpkgs-config: ~/.config/nixpkgs

my configuration.nix only contains this for xserver:

  services.xserver = {
    enable = true;
    layout = "us";
    videoDrivers = [ "nvidia" ];
    displayManager.lightdm.enable = true;
    windowManager.i3.enable = true;

be careful of including nerdfonts though… its >=20GBs to download.


That’s great, but I cannot get my wireless network to operate and your tutorial doesn’t cover that. Laptop has no Ethernet. This is why I suggested pre-rolled configs that only need minor tweaks to get an operational system. I tried your i3 config and I could not get it to launch. Lightdm comes up. I enter my password (which I created from the command line) and then lightdm comes up.

1 Like

be careful of including nerdfonts though… its >=20GBs to download.

There is an override so you can select which fonts you want.

nerdfonts.override {
  fonts = [ "DejaVuSansMono" ];

Lightdm comes up. I enter my password (which I created from the command line) and then lightdm comes up.

Have you selected a session? That happened to me before as well and I was reading logfiles for half an hour until I noticed that I did not have selected a session.

The most helpful resources currently are, IMO, man configuration.nix, and the manuals web pages at NixOS - NixOS 21.05 manual and Introduction. These three resources really cover a lot of how to accomplish different things. There’s also NixOS - Nixpkgs 21.05 manual if you need to learn about how to do your own packaging.

1 Like

with help from the team from the matrix site, I was able to get wireless working on my basic install. However, when I try to switch to i3 using your configs I get the following error:

[guru@gnomeregan:~]$ sudo nixos-rebuild switch
[sudo] password for guru: 
building Nix...
building the system configuration...
error: The option `services.xserver.displayManager.job.execCmd' has conflicting definitions, in `/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/services/x11/display-managers/sddm.nix' and `/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/services/x11/display-managers/lightdm.nix'.
(use '--show-trace' to show detailed location information)

Some guidance is requested.

Never mind. Found my stupid mistake.

There are already many nix configs available on GitHub. Going through many of the files at first is just overwhelming. Something like cookiecutter/yeoman to scaffold new configuration would be great. This way once can ensure the directory structure and adding new packages/overlays can be automated from shell. This can allow configuring desktop/wm/pkgs/laptop mode/server mode etc.,

1 Like

Exactly. Such a repository would be an invaluable resource to new and experienced users alike.

There is an repo that attempts something like this based on the experimental flakes feature: GitHub - divnix/devos: NixOS Template

1 Like

Sounds promising, but do you think it is in the best interest of the distro and it’s new users (who barely grasp the concept of configuration.nix) and tell them to mess with code that isn’t even beta quality yet and is one more level of abstraction/complication?

After two weeks I got wireless networking set up correctly in my configuration.nix file and a basic install. I had to abandon this because I need my laptop operational for an upcoming vacation trip and I don’t need to spend a week in the Keys fiddling with a cranky OS.

If flakes is going to simplify things, I am all for it. If it is raising the bar of entry, it’s a bad idea and nixOS will slip into the Arch uber-nerd niche.