mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-13 12:35:48 +03:00
2410994f17
Mainly allows using the simulator with the error applet
13 lines
298 B
Ruby
13 lines
298 B
Ruby
# Handles lazy-loading the configuration, and giving a value for a given key.
|
|
module Configuration
|
|
def self.[](key)
|
|
@configuration ||=
|
|
if File.exist?("/etc/boot/config")
|
|
JSON.parse(File.read("/etc/boot/config"))
|
|
else
|
|
{}
|
|
end
|
|
@configuration[key]
|
|
end
|
|
end
|