Populating /etc on start up with empty /

I’ve been rebuilding my laptop along the lines of Erase your darlings: immutable infrastructure for mutable systems - Graham Christensen and I am finding that the following in configuration.nix isn’t leading to a population of /etc with the links.

I’ve been reading the code and maybe its related to the expectation that /etc/static exist (rather than within the derivation under /nix (which is not lost between reboots).

  lib.etc = {
    "nixos" = { source = "/persist/etc/nixos/*"; };
    "wpa_supplicant.conf" = { source = "/persist/etc/wpa_supplicant.conf"; };

I’m sure it is something simple that I am missing… Any hints?

Hmm, why are you using lib.etc? lib is used for providing nix values to other modules, you should use environment.etc instead.

D’oh, still learning… that at least got wpa_supplicant.conf in place. Will ponder /etc/nixos tomorrow.

Thanks @Ninlives!