module/nix: Add backward compat with nixos for binary caches

This commit is contained in:
Josh Robson Chase 2021-12-30 08:10:45 -05:00 committed by Alexander Sosedkin
parent c1b61fc340
commit 07c4406897

View file

@ -6,9 +6,16 @@ with lib;
let let
cfg = config.nix; cfg = config.nix;
renameNixOpt = old: new:
(mkRenamedOptionModule [ "nix" old ] [ "nix" new ]);
in in
{ {
# Backward-compatibility with the NixOS options.
imports = [
(renameNixOpt "binaryCaches" "substituters")
(renameNixOpt "binaryCachePublicKeys" "trustedPublicKeys")
];
###### interface ###### interface