diff --git a/modules/system/services/wlan.nix b/modules/system/services/wlan.nix index e8eb4f1..ba7ec43 100644 --- a/modules/system/services/wlan.nix +++ b/modules/system/services/wlan.nix @@ -35,8 +35,9 @@ in }) |> lib.listToAttrs; - systemd.tmpfiles.rules = - cfg.networks - |> lib.map (name: "C /var/lib/iwd/${name} - - - - ${config.sops.secrets."iwd/${name}".path}"); + systemd.services.iwd.preStart = '' + rm --force /var/lib/iwd/*.{psk,8021x} + install -m 600 /run/secrets/iwd/* /var/lib/iwd + ''; }; }