1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00

download-from-binary-cache: add nix.conf options

This commit is contained in:
Eelco Dolstra 2012-07-09 10:57:28 -04:00
parent 98a423b75a
commit 099125435f
3 changed files with 30 additions and 6 deletions

View file

@ -14,16 +14,16 @@ $curl = "@curl@";
$useBindings = "@perlbindings@" eq "yes";
%config = ();
sub readConfig {
my %config;
my $config = "@sysconfdir@/nix/nix.conf";
my $config = "$confDir/nix.conf";
return unless -f $config;
open CONFIG, "<$config" or die "cannot open `$config'";
while (<CONFIG>) {
/^\s*([\w|-]+)\s*=\s*(.*)$/ or next;
$config{$1} = $2;
print "|$1| -> |$2|\n";
}
close CONFIG;
}