Nixos-generate-config: Difference between revisions
Appearance
m Fixed slight inaccuracy |
No edit summary |
||
Line 4: | Line 4: | ||
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>/etc/nixos/configuration.nix</code> | ||
* <code>hardware-configuration.nix</code> | * <code>/etc/nixos/hardware-configuration.nix</code> | ||
== hardware specific notes == | == 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: | 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: | ||
< | {{file|/etc/nixos/configuration.nix|nix| | ||
<nowiki> | |||
fileSystems."/".options = [ "noatime" "nodiratime" "discard" ]; | fileSystems."/".options = [ "noatime" "nodiratime" "discard" ]; | ||
</ | </nowiki> | ||
}} | |||
A collection of hardware specific platforms with their config can be found at [https://github.com/NixOS/nixos-hardware NixOS Hardware repository] | A collection of hardware specific platforms with their config can be found at [https://github.com/NixOS/nixos-hardware NixOS Hardware repository] |
Revision as of 03:55, 21 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:
/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