Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
nixos tests: move common configuration into separate file
This allows tests outside nixos to use acme setup.
- Loading branch information
1 parent
f37b39d
commit 6eacc17
Showing
2 changed files
with
28 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{ lib, nodes, ... }: { | ||
networking.nameservers = [ | ||
nodes.letsencrypt.config.networking.primaryIPAddress | ||
]; | ||
|
||
nixpkgs.overlays = lib.singleton (self: super: { | ||
cacert = super.cacert.overrideDerivation (drv: { | ||
installPhase = (drv.installPhase or "") + '' | ||
cat "${nodes.letsencrypt.config.test-support.letsencrypt.caCert}" \ | ||
>> "$out/etc/ssl/certs/ca-bundle.crt" | ||
''; | ||
}); | ||
|
||
# Override certifi so that it accepts fake certificate for Let's Encrypt | ||
# Need to override the attribute used by simp_le, which is python3Packages | ||
python3Packages = (super.python3.override { | ||
packageOverrides = lib.const (pysuper: { | ||
certifi = pysuper.certifi.overridePythonAttrs (attrs: { | ||
postPatch = (attrs.postPatch or "") + '' | ||
cat "${self.cacert}/etc/ssl/certs/ca-bundle.crt" \ | ||
> certifi/cacert.pem | ||
''; | ||
}); | ||
}); | ||
}).pkgs; | ||
}); | ||
} |