Nixos-generate-config: Difference between revisions

m Fixed slight inaccuracy
Pigs (talk | contribs)
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:
 
<syntaxHighlight lang=nix>
{{file|/etc/nixos/configuration.nix|nix|
<nowiki>
fileSystems."/".options = [ "noatime" "nodiratime" "discard" ];
fileSystems."/".options = [ "noatime" "nodiratime" "discard" ];
</syntaxHighlight>
</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]