mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-15 19:23:01 +03:00
555548d3f4
This way it can be used at any time, regardless of execution state, as long as the Configuration module has been parsed.
8 lines
218 B
Ruby
8 lines
218 B
Ruby
# Handles lazy-loading the configuration, and giving a value for a given key.
|
|
module Configuration
|
|
def self.[](key)
|
|
@configuration ||= JSON.parse(File.read("/etc/boot/config"));
|
|
@configuration[key]
|
|
end
|
|
end
|