Skip to main content

Module discover

Module discover 

Source

Enums§

DesktopEnvironment
Detected Linux desktop environment (if any).
Platform
The operating system nex is running on.

Functions§

default_repo_name
Return the conventional repo directory name for this platform.
detect_desktop_environment
Detect the Linux desktop environment from standard env vars.
detect_platform
Detect the current platform at runtime (not compile-time).
detect_system
Detect the nix system string for this machine. Uses runtime detection so cross-compiled binaries report the correct target.
find_repo
Auto-detect the nix config repo by walking up from CWD, then checking well-known paths. Finds both nix-darwin (macOS) and NixOS repos.
hostname
Auto-detect the hostname. Uses scutil on macOS, /etc/hostname or hostname(1) on Linux.
is_nixos
Check if the system is running NixOS (has /etc/NIXOS marker).