> ## Content Index
> Fetch the complete content index at: https://blog.matthewbrunelle.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Non-obvious Nix Options
- URL: https://blog.matthewbrunelle.com/non-obvious-nix-options/
- Published: 2026-09-18T11:17:04.000Z
- Updated: 2026-09-18T11:17:04.000Z
- Description: You followed the NixOS installation guide, now what? Awash in a sea of nix options what are you missing in your config?
- Author: Matthew Brunelle
- Tags: NixOS

#### On this page

NixOS and Home Manager have plenty of options you can set. This is the result of a diligent community accumulating work over many years. You will not need most of it, but when you do want to configure any particular thing, it's nice to have the choice.

I was looking at my config and noticed I have options that are used broadly across my machines. Over the years I've encountered some of these options that I wish I had known about sooner. Essentially, if I followed the [installation guide](https://nixos.org/manual/nixos/stable/?ref=blog.matthewbrunelle.com), what else might I want to do?

Also, NixOS has sane defaults for plenty of options and those evolve over time. I used to set [boot.initrd.systemd.enable](https://search.nixos.org/options?channel=unstable&query=boot.initrd.systemd.enable&ref=blog.matthewbrunelle.com) since it was required to use another option, but as of 26.05 it now defaults to true. So my focus here is on the options I didn't realize I needed to change.

---

## Including some batteries

I often look at Fedora's release notes and the [changes page](https://fedoraproject.org/wiki/Changes?ref=blog.matthewbrunelle.com) on their Wiki to check the discussion around what they decide to accept. I find Fedora strikes a good balance of not waiting too long to adopt something, and not jumping on something too early. For example, Fedora switched to PipeWire in release 34 and not long after I made the jump.

Some options to check:

[services.automatic-timezoned.enable](https://search.nixos.org/options?channel=unstable&query=services.automatic-timezoned.enable&ref=blog.matthewbrunelle.com) \- I [went to NeurIPS](https://blog.matthewbrunelle.com/neurips-2025-retrospective/) in California last year and realized the timezone on my laptop didn't automatically adjust. You can alternatively force `time.timeZone` to false and then manually set it through GNOME or KDE. If you have a desktop you can just set `time.timeZone`.

[services.fstrim.enable](https://search.nixos.org/options?channel=unstable&query=services.fstrim.enable&ref=blog.matthewbrunelle.com) \- If you have an SSD you probably want to periodically trim the FS and not use `discard`. [Fedora enabled this in 2020](https://fedoraproject.org/wiki/Changes/EnableFSTrimTimer?ref=blog.matthewbrunelle.com). The exception is if you are running BTRFS/ZFS or have LUKS. The [Arch Wiki explanation](https://wiki.archlinux.org/title/Dm-crypt/Specialties?ref=blog.matthewbrunelle.com#Discard/TRIM%5Fsupport%5Ffor%5Fsolid%5Fstate%5Fdrives%5F%28SSD%29) goes over the nuance. On my desktop I am boring and run EXT4.

[services.fwupd.enable](https://search.nixos.org/options?channel=unstable&query=services.fwupd.enable&ref=blog.matthewbrunelle.com) \- Enables the firmware update service for flashing firmware updates from the lovely [LVFS](https://fwupd.org/?ref=blog.matthewbrunelle.com) to devices. This is especially useful for my Framework laptop since they push firmware updates regularly. See my [Framework Laptop 13 DIY Edition setup](https://blog.matthewbrunelle.com/setting-up-my-new-framework-laptop-13-diy-edition-with-nixos/).

[hardware.enableAllFirmware](https://search.nixos.org/options?channel=unstable&query=hardware.enableAllFirmware&ref=blog.matthewbrunelle.com) or [hardware.enableRedistributableFirmware](https://search.nixos.org/options?channel=unstable&query=hardware.enableRedistributableFirmware&ref=blog.matthewbrunelle.com) \- both enable binary blob firmware for devices. `enableRedistributableFirmware` covers `unfreeRedistributableFirmware` licensed firmware like `linux-firmware`, and `enableAllFirmware` is a superset that also includes firmware with license `unfree`. For example, my desktop only loads firmware for my Intel Wifi, Intel Bluetooth and AMD graphics. All of which could be pulled in with just `enableRedistributableFirmware`.

The following enables mDNS for .local domains to work:

```nix
  services.avahi = {
    enable = true;
    nssmdns4 = true;
    openFirewall = true;
  };

```

[services.printing.enable](https://search.nixos.org/options?channel=unstable&query=services.printing.enable&ref=blog.matthewbrunelle.com) \- See [Printing on the Wiki](https://wiki.nixos.org/wiki/Printing?ref=blog.matthewbrunelle.com) for more options. In combination with the `avahi` settings you can have network auto discovery which is convenient on a laptop.

[hardware.bluetooth.powerOnBoot](https://search.nixos.org/options?channel=unstable&query=hardware.bluetooth.powerOnBoot&ref=blog.matthewbrunelle.com) \- Automatically turns Bluetooth on at boot.

---

## Oops I ran out of disk space

Every time you rebuild you add another generation to the system. This is fantastic for rollback, but I didn't realize how much space the Nix store was taking up until one day I was completely full. This is not an uncommon occurrence when people first try Nix.

I could run [garbage collection](https://nixos.org/guides/nix-pills/11-garbage-collector.html?ref=blog.matthewbrunelle.com) on my own, but I never remember to. Alternatively, I can automate it through [nix.gc](https://search.nixos.org/options?channel=unstable&query=nix.gc&ref=blog.matthewbrunelle.com), but I like to use [nh](https://github.com/nix-community/nh?ref=blog.matthewbrunelle.com), the Nix helper, which has `nh clean`. That reimplements `nix-collect-garbage` while also cleaning gcroots from things like devenv:

```nix
  programs.nh = {
    enable = true;
    clean = {
      enable = true;
      dates = "weekly";
      extraArgs = "--keep-since 14d --keep 3 --keep-one";
    };
  };

```

This will:

- Run the clean weekly.
- Remove anything older than two weeks.
- Keep at least the three most recent generations, regardless of age.
- Keep any active direnv gcroots.

Note that if you add this in your Home Manager config rather than your system config it will not be able to find all GC roots on the system, which bit me in the past.

[nix.settings.auto-optimise-store](https://search.nixos.org/options?channel=unstable&query=auto-optimise-store&ref=blog.matthewbrunelle.com) \- Similar to, but different from GC. This will find identical files and replace them with hard-links so there is only one copy.

[boot.loader.systemd-boot.configurationLimit](https://search.nixos.org/options?channel=unstable&query=boot.loader.systemd-boot.configurationLimit&ref=blog.matthewbrunelle.com) \- I didn't realize I needed this until I filled up my EFI partition once. I cap mine at 8\. This is less important now that I have GC scheduled, but I keep it for good measure.

---

## A couple of Nix gotchas

Nix is its own special beast, with its own set of suprising defaults.

[nix.settings.max-jobs](https://search.nixos.org/options?channel=unstable&query=nix.settings.max-jobs&ref=blog.matthewbrunelle.com) and [nix.settings.cores](https://search.nixos.org/options?channel=unstable&query=nix.settings&ref=blog.matthewbrunelle.com) \- On a desktop or laptop a big rebuild can potentially slow down your interactive applications while it runs. The Nix reference manual has a page on [Tuning Cores and Jobs](https://releases.nixos.org/nix/nix-2.20.9/manual/advanced-topics/cores-vs-jobs.html?ref=blog.matthewbrunelle.com). I use 4 and 4 on my machine. However, as I'm writing this I found out I could set [nix.daemonCPUSchedPolicy](https://search.nixos.org/options?channel=unstable&query=nix.daemonCPUSchedPolicy&ref=blog.matthewbrunelle.com) and [nix.daemonIOSchedClass](https://search.nixos.org/options?channel=unstable&query=nix.daemonIOSchedClass&ref=blog.matthewbrunelle.com) to `idle`. I haven't tested this, but the config notes it's sensible for interactive systems like desktops and laptops.

[boot.kernelPackages](https://search.nixos.org/options?channel=unstable&query=boot.kernelPackages&ref=blog.matthewbrunelle.com)` = pkgs.linuxPackages_latest;` \- even if you are on `unstable` you will not get the latest kernel unless you set this. See [the Linux Kernel wiki page](https://wiki.nixos.org/wiki/Linux%5Fkernel?ref=blog.matthewbrunelle.com).

[nix.channel.enable](https://search.nixos.org/options?channel=unstable&query=nix.channel.enable&ref=blog.matthewbrunelle.com) \- If you use flakes, you can disable channels. I was confused once when packages were not matching up as I expected and that was because an old channel had been added at one point.

[nix.registry.nixpkgs.flake](https://search.nixos.org/options?channel=unstable&query=nix.registry&ref=blog.matthewbrunelle.com)` = nixpkgs;` \- This will ensure that commands like nix shell use the version of nixpkgs you built the system with. Thank you Ian for [the recommendation](https://ianthehenry.com/posts/how-to-learn-nix/more-flakes/?ref=blog.matthewbrunelle.com). Just make sure to also set [nix.nixPath](https://search.nixos.org/options?channel=unstable&query=nix.nixpath&ref=blog.matthewbrunelle.com)` = ["nixpkgs=flake:nixpkgs"]` as per this [thread](https://discourse.nixos.org/t/24-05-add-flake-to-nix-path/46310/13?ref=blog.matthewbrunelle.com).

[programs.nix-index.enable](https://search.nixos.org/options?channel=unstable&query=programs.nix-index.enable&ref=blog.matthewbrunelle.com) \- If you run a program that is not installed you will get a list of the packages that contain the program.

---

## An option for everything

There is an overabundance of options with Nix and I love that. Here is a cursed configuration option that is highly specific to me:

```nix
  hardware.display.edid.linuxhw."XL2420G_2014" = ["BNQ7F39" "XL2420G" "2014" "2E7C0DC569A3"];
  hardware.display.outputs."DP-2".edid = "XL2420G_2014.bin";
  hardware.display.outputs."DP-2".mode = "e";

```

I cannot for the life of me get Linux to properly detect one of my monitors over DisplayPort unless I use this incantation that I figured out thanks to the wonderful [EDID repository](https://github.com/linuxhw/EDID/tree/cc83e52221a9a6d98632f00b54be64fd0bee0394?ref=blog.matthewbrunelle.com). You know what though? I love that I can declare this in my config and remember this is how I solved the problem.

Oh and Home Manager has its own set of options! So I'll do a follow up on those in the future.