{ pkgs, lib, config, ... }:
-let cfg = config.nix;
- inherit (lib) types;
- # Alternative which does not need to re-export envvars when called via sudo.
- # But this is maybe more clear to just (re-)export envvars.
- # And anyway, using NIX_CONF_DIR=${cfg.nixConf} directly does not work,
- # maybe because of filesystem restriction access set by nix, I don't know.
- /*
+let
+ cfg = config.nix;
+ inherit (lib) types;
+ # Alternative which does not need to re-export envvars when called via sudo.
+ # But this is maybe more clear to just (re-)export envvars.
+ # And anyway, using NIX_CONF_DIR=${cfg.nixConf} directly does not work,
+ # maybe because of filesystem restriction access set by nix, I don't know.
+ /*
nix = pkgs.writeShellScriptBin "nix" ''
NIX_CONF_DIR=${cfg.nixConf} \
NIX_SSL_CERT_FILE="${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" \