NixOS analog audio card always unavailable on boot

My NixOS always boots without audio. If I open pavucontrol, the only available output device is HDMI, even though there’s no HDMI cable connected.

I need to plug in some headphones on the p2 port and unplug it. Only then the speakers are available as an option for output on pavucontrol.

Here’s the output of aplay -l:

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: CX20753/4 Analog [CX20753/4 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: PCH [HDA Intel PCH], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

On my configuration.nix, I also have the following lines:

  # Enable sound.
  sound.enable = true;
  hardware.pulseaudio.enable = true;

Here’s the contents of my /etc/asound.conf:

cat /etc/asound.conf
pcm_type.pulse {
  libs.native = /nix/store/rxdkwbxaylrkqshhp7wrdvafawwfgk95-alsa-plugins-1.2.7.1/lib/alsa-lib/libasound_module_pcm_pulse.so ;

}
pcm.!default {
  type pulse
  hint.description "Default Audio Device (via PulseAudio)"
}
ctl_type.pulse {
  libs.native = /nix/store/rxdkwbxaylrkqshhp7wrdvafawwfgk95-alsa-plugins-1.2.7.1/lib/alsa-lib/libasound_module_ctl_pulse.so ;

}
ctl.!default {
  type pulse
}

Any help would be much appreciated!