HXEZUCTD7T3YUT3XKWQOWRFSADNFZT2EYXHOATIBXWTNACDHNQQQC
4QI6G7YB64IPWRQYGI4D2CEEUGPSVM6MVKUA4VVRKKIEA4D34FEQC
5DXGOH6QPIMK5CBZ6G3MN7UOIJRGFA3MP7C6FAFWLB7V2TAS33FAC
DNOLOMX7MSBZMPOZUQPCCGQJ2OKV3642C4FWY6P6SK4LR5U26LTQC
4Y3LBQYIG5VWPKPEP74XEGJ7KYP5AAT6OQYZP5TXQNHNHK7KP6LAC
2I3HFWBKLTTXUHJ4KXMKUQOJASEF2TJYVHLYWCNCA7GLF4WCFN6QC
HX4QYOYAKKFKK4KF6SZ6FQCM5ZF7ZFDTQUR4GS5WPPTYZASYZZUAC
UIA3ULNUQVJJJYYVSHCT3GMNYBB5GRHEMHBU2KIFPFG6YVTLMYKAC
6HYCG3DC5RNVSH66X5DZO36OIU2IUQYH64F7QFAORALLUC3LOQDQC
4WLW4VHSOVVFNMPW3S7XVIC3MH7BSUN3FQ37LXGOJ4ODMPVGLO6AC
C66VQYWTXDD6TSGEABH34NM2N33X4QVW33RTBUQ4WA3F6S24IAKQC
OWRS526HCBSKWK5KFWO34YSZRNRXWBBG74KLW7BZSRIIZUNSELBQC
use strict;
use Setup;
my %ctx = test_init(
use_external_destination_store => 0,
hydra_config => "include foo.conf"
);
write_file($ctx{'tmpdir'} . "/foo.conf", q|
<foo>
include bar.conf
</foo>
|);
write_file($ctx{'tmpdir'} . "/bar.conf", q|
bar = baz
|);
require Hydra::Helper::Nix;
use Test2::V0;
is(Hydra::Helper::Nix::getHydraConfig(), {
foo => { bar => "baz" }
}, "Nested includes work.");
done_testing;
open(my $fh, '>', $nixconf) or die "Could not open file '$nixconf' $!";
print $fh "sandbox = false\n";
print $fh $opts{'nix_config'} || "";
close $fh;
my $nix_config = "sandbox = false\n" . $opts{'nix_config'};
write_file($nixconf, $nix_config);