Declarative wifi configuration

I’d like to make my computer connect to my wifi automatically. Is this possible to do through configuration.nix? There seems to be options in networking related to it, but I cannot figure it out. Preferably the wifi password would be stored in a separate file so the configuration can be versioned.

1 Like

We have a way but it requires the password in the configuration and not externally: NixOS - NixOS 21.05 manual


Thanks, must have missed that section in manual.