Install and Configure NixOS on a Linode Proposed Changes

Open Beginner friendly
#7,375 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
64/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
linux
Domain
documentation

Research direction

Open the linked Install NixOS on Linode guide and find the “Rewrite Device Identifiers” section. Review the fileSystems and swapDevices blocks it instructs users to add to /mnt/etc/nixos/configuration.nix, then verify the guide leaves the generated hardware-configuration.nix entries unchanged. Done means the instructions no longer create conflicting device definitions and the nixos-install flow is consistent.

Written by the indexing model from the issue text.

Description

Link: https://www.linode.com/docs/guides/install-nixos-on-linode/

Issue

When following these instructions, I ran into this error when running the NixOS installer nixos-install.

Error snippet:
The option fileSystems."/".device has conflicting definition values:

  • configuration.nix: /dev/sda
  • hardware-configuration.nix: /dev/disk/by-uuid/...

Suggested Fix

Recommend removing the 'Rewrite Device Identifiers' section and its code. You're defining the same option twice:

  1. hardware-configuration.nix (generated by nixos-generate-config) already sets fileSystems."/".device to a stable path like /dev/disk/by-uuid/....
  2. The guide then has you set it again in configuration.nix to /dev/sda, which creates a conflict

The fix was to remove the fileSystems."/" block and swapDevices block that the guide tells you to add to /mnt/etc/nixos/configuration.nix. Leave the entries in /mnt/etc/nixos/hardware-configuration.nix as-is (UUID-based). Re-run nixos-install

There are potential overrides but it works fine without those configuration settings.

All other instructions worked fine, except the installer disk size which has already been reported in issues 7348 and 7361. Thanks! Great guide.

Dominant language
Python
Stars
1.4k
Forks
1.2k
Avg merge
9m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from linode/docs

All issues in linode/docs

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.