I’m running NixOS in WSL and am unable to update (nixos-rebuild switch
) after my company changed firewall providers. All my coworkers were able to get around this by following these steps:
- Extract firewall cert
sudo cp firewall.crt /usr/local/share/ca-certificates/
sudo update-ca-certificates
It’s my understanding that the equivalent for NixOS would be adding the cert to either security.pki.certificateFiles
or security.pki.certificates
.
However I’m not able to do this because (seemingly) it’s not possible for me to update my config without a network connection, and I can’t connect to the network without updating my config. I’ve tried a few things to get around the cert issue.
- Set
NIX_SSL_CERT_FILE
and addedssl-cert-file
to nix.conf. Had to setNIX_CONFIG
to target an writable config file [1][2] - Run
nixos-rebuild
with--option substitute false
[3] - Acquire openssl/update-ca-certificates via a nix shell with
NIX_SSL_CERT_FILE
set
None of these worked for me. I’m not sure what to try next, any help would be appreciated.
[1] Use a custom TLS/SSL CA in the nixos installer
[2] nix.conf - Nix Reference Manual
[3] Rebuild NixOS Offline - #8 by rnhmjoj