Nix 2.93.3
Lix: A modern, delicious implementation of the Nix package manager; unstable internal interfaces
Loading...
Searching...
No Matches
apply-config-options.hh
Go to the documentation of this file.
1#pragma once
6
8
9namespace nix {
10
15{
22 std::optional<Path> path = std::nullopt;
23
28 std::optional<Path> home = std::nullopt;
29
36 bool fromEnvVar = false;
37
42 std::string relativeDisplay() const {
43 if (path) {
44 return *path;
45 } else if (fromEnvVar) {
46 return "$NIX_CONFIG";
47 } else {
48 return "<unknown>";
49 }
50 }
51};
52
53}
Definition apply-config-options.hh:15
std::optional< Path > home
Definition apply-config-options.hh:28
std::string relativeDisplay() const
Definition apply-config-options.hh:42
bool fromEnvVar
Definition apply-config-options.hh:36
std::optional< Path > path
Definition apply-config-options.hh:22