Difference between revisions of "Nixos-generate-config"

From NixOS Wiki
Jump to: navigation, search
m (rollback unauthorized mass edits)
Tag: Rollback
("nodiratime" has no effect if the filesystem is already mounted "noatime". "noatime" suppresses atime updates for all filesystem objects including directories)
 
Line 8: Line 8:
  
 
<syntaxHighlight lang=nix>
 
<syntaxHighlight lang=nix>
fileSystems."/".options = [ "noatime" "nodiratime" "discard" ];
+
fileSystems."/".options = [ "noatime" "discard" ];
 
</syntaxHighlight>
 
</syntaxHighlight>
  
 
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]

Latest revision as of 21:02, 27 September 2025

This command 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" "discard" ];

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