Merge pull request #102 from DeterminateSystems/colemickens/fallback
nix.conf: move write for 'fallback', always set it
This commit is contained in:
commit
5b126b691b
|
@ -222,6 +222,11 @@ async fn main_cli() -> Result<()> {
|
||||||
.open(&nix_conf_path)
|
.open(&nix_conf_path)
|
||||||
.with_context(|| "Creating nix.conf")?;
|
.with_context(|| "Creating nix.conf")?;
|
||||||
|
|
||||||
|
// always enable fallback, first
|
||||||
|
nix_conf
|
||||||
|
.write_all(b"fallback = true\n")
|
||||||
|
.with_context(|| "Setting fallback in nix.conf")?;
|
||||||
|
|
||||||
let store = Arc::new(NixStore::connect()?);
|
let store = Arc::new(NixStore::connect()?);
|
||||||
|
|
||||||
let narinfo_negative_cache = Arc::new(RwLock::new(HashSet::new()));
|
let narinfo_negative_cache = Arc::new(RwLock::new(HashSet::new()));
|
||||||
|
|
|
@ -186,13 +186,7 @@ pub async fn setup_legacy_post_build_hook(
|
||||||
|
|
||||||
/* Update nix.conf. */
|
/* Update nix.conf. */
|
||||||
nix_conf
|
nix_conf
|
||||||
.write_all(
|
.write_all(format!("post-build-hook = {}\n", post_build_hook_script.display()).as_bytes())
|
||||||
format!(
|
|
||||||
"fallback = true\npost-build-hook = {}\n",
|
|
||||||
post_build_hook_script.display()
|
|
||||||
)
|
|
||||||
.as_bytes(),
|
|
||||||
)
|
|
||||||
.with_context(|| "Writing to nix.conf")?;
|
.with_context(|| "Writing to nix.conf")?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in a new issue