Jump to content

Nixos-generate-config: Difference between revisions

From NixOS Wiki
Iwanb (talk | contribs)
Say from which package nixos-generate-config comes from.
m Fixed slight inaccuracy
Line 1: Line 1:
<syntaxHighlight lang=bash>
# nixos-generate-config
</syntaxHighlight>
This command is part of the <code>nixos-install-tools</code> package. It analyzes your hardware configuration and generates two files of:
This command is part of the <code>nixos-install-tools</code> package. It analyzes your hardware configuration and generates two files of:
* <code>configuration.nix</code>
* <code>configuration.nix</code>

Revision as of 08:34, 10 April 2025

# nixos-generate-config

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

  • configuration.nix
  • 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:

fileSystems."/".options = [ "noatime" "nodiratime" "discard" ];

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