Jump to content

Nixos-generate-config

From NixOS Wiki
Revision as of 03:55, 21 April 2025 by Pigs (talk | contribs)
# nixos-generate-config

This command is part of the nixos-install-tools package. It analyzes your hardware configuration and generates two files of:

  • /etc/nixos/configuration.nix
  • /etc/nixos/hardware-configuration.nix

hardware specific notes

If you are using an SSD it may be useful to enable TRIM support as well as set filesystem flags to improve the SSD performance:

❄︎ /etc/nixos/configuration.nix
fileSystems."/".options = [ "noatime" "nodiratime" "discard" ];

A collection of hardware specific platforms with their config can be found at NixOS Hardware repository