don't duplicate substituter list

This commit is contained in:
Artemis Tosini 2024-07-13 15:32:33 +00:00
parent eb253d097d
commit 3bf2630935
Signed by: artemist
GPG key ID: EE5227935FE3FF18

View file

@ -7,7 +7,7 @@ use crate::action::{
Action, ActionDescription, ActionError, ActionErrorKind, ActionTag, StatefulAction,
};
use crate::parse_ssl_cert;
use crate::settings::UrlOrPathOrString;
use crate::settings::{UrlOrPathOrString, LIX_DEFAULT_SUBSTITUTERS, LIX_DEFAULT_SUBSTITUTER_KEYS};
use indexmap::map::Entry;
use std::path::PathBuf;
@ -136,11 +136,11 @@ impl PlaceNixConfiguration {
// Set up our substituters.
settings.insert(
"substituters".to_string(),
"https://cache.nixos.org https://cache.lix.systems".to_string(),
LIX_DEFAULT_SUBSTITUTERS.join(" "),
);
settings.insert(
"trusted-public-keys".to_string(),
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=".to_string()
LIX_DEFAULT_SUBSTITUTER_KEYS.join(" "),
);
if enable_flakes {