Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
Loading...
Searching...
No Matches
global-paths.hh File Reference
#include <filesystem>
#include <vector>

Go to the source code of this file.

Functions

const std::filesystem::path & nix::nixConfDir ()
const std::vector< std::filesystem::path > & nix::nixUserConfFiles ()

Function Documentation

◆ nixConfDir()

const std::filesystem::path & nix::nixConfDir ( )

On Windows, NIX_CONF_DIR (and other directories like NIX_STATE_DIR, NIX_LOG_DIR) are not defined at compile time, so we determine paths at runtime using the Windows known folders API (FOLDERID_ProgramData). This allows Nix to work correctly regardless of which drive Windows is installed on.

The directory where system configuration files are stored.

This is needed very early during initialization, before a main Settings object can be constructed.

◆ nixUserConfFiles()

const std::vector< std::filesystem::path > & nix::nixUserConfFiles ( )

A list of user configuration files to load.

This is needed very early during initialization, before a main Settings object can be constructed.