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:
parent
98a423b75a
commit
099125435f
3 changed files with 30 additions and 6 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue