Struct nix_compat::nixcpp::conf::NixConfig
source · pub struct NixConfig<'a> {Show 16 fields
pub allowed_users: Option<Vec<&'a str>>,
pub auto_optimise_store: Option<bool>,
pub cores: Option<u64>,
pub max_jobs: Option<u64>,
pub require_sigs: Option<bool>,
pub sandbox: Option<SandboxSetting>,
pub sandbox_fallback: Option<bool>,
pub substituters: Option<Vec<&'a str>>,
pub system_features: Option<Vec<&'a str>>,
pub trusted_public_keys: Option<Vec<VerifyingKey>>,
pub trusted_substituters: Option<Vec<&'a str>>,
pub trusted_users: Option<Vec<&'a str>>,
pub extra_platforms: Option<Vec<&'a str>>,
pub extra_sandbox_paths: Option<Vec<&'a str>>,
pub experimental_features: Option<Vec<&'a str>>,
pub builders_use_substitutes: Option<bool>,
}
Expand description
Represents configuration as stored in /etc/nix/nix.conf. This list is not exhaustive, feel free to add more.
Fields§
§allowed_users: Option<Vec<&'a str>>
§auto_optimise_store: Option<bool>
§cores: Option<u64>
§max_jobs: Option<u64>
§require_sigs: Option<bool>
§sandbox: Option<SandboxSetting>
§sandbox_fallback: Option<bool>
§substituters: Option<Vec<&'a str>>
§system_features: Option<Vec<&'a str>>
§trusted_public_keys: Option<Vec<VerifyingKey>>
§trusted_substituters: Option<Vec<&'a str>>
§trusted_users: Option<Vec<&'a str>>
§extra_platforms: Option<Vec<&'a str>>
§extra_sandbox_paths: Option<Vec<&'a str>>
§experimental_features: Option<Vec<&'a str>>
§builders_use_substitutes: Option<bool>
Implementations§
source§impl<'a> NixConfig<'a>
impl<'a> NixConfig<'a>
sourcepub fn parse(input: &'a str) -> Result<Self, Error>
pub fn parse(input: &'a str) -> Result<Self, Error>
Parses configuration from a file like /etc/nix/nix.conf
, returning
a NixConfig with all values contained in there.
It does not support parsing multiple config files, merging semantics,
and also does not understand include
and !include
statements.
Trait Implementations§
source§impl<'a> PartialEq for NixConfig<'a>
impl<'a> PartialEq for NixConfig<'a>
impl<'a> Eq for NixConfig<'a>
impl<'a> StructuralPartialEq for NixConfig<'a>
Auto Trait Implementations§
impl<'a> Freeze for NixConfig<'a>
impl<'a> RefUnwindSafe for NixConfig<'a>
impl<'a> Send for NixConfig<'a>
impl<'a> Sync for NixConfig<'a>
impl<'a> Unpin for NixConfig<'a>
impl<'a> UnwindSafe for NixConfig<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)