1
1
mirror of https://github.com/NixOS/mobile-nixos.git synced 2024-12-12 15:24:14 +03:00
mobile-nixos/boot/lib/xdg.rb

19 lines
460 B
Ruby
Raw Normal View History

2021-06-14 00:07:16 +03:00
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
# While we're making this for NixOS, we're still following the spec in the
# actual source. Any deviation will be elsewhere.
module XDG
extend self
def config_dirs()
dirs = ENV["XDG_CONFIG_DIRS"]
dirs ||= "/etc/xdg"
dirs.split(":")
end
def data_dirs()
dirs = ENV["XDG_DATA_DIRS"]
dirs ||= "/usr/local/share/:/usr/share/"
dirs.split(":")
end
end