Nix flake for xearthlayer - streaming satellite imagery for X-Plane 12 flight simulator.
Pre-built binaries are available via Cachix:
nix run nixpkgs#cachix -- use mescamOr add to your NixOS configuration:
{
nix.settings.substituters = [ "https://mescam.cachix.org" ];
# Run 'cachix use mescam' to get the public key
}nix run github:mescam/nixearthlayer
nix shell github:mescam/nixearthlayerThe Home Manager module provides full declarative configuration and writes ~/.xearthlayer/config.ini.
# flake.nix
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager";
nixearthlayer.url = "github:mescam/nixearthlayer";
};
outputs = { nixpkgs, home-manager, nixearthlayer, ... }: {
homeConfigurations.pilot = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
modules = [
nixearthlayer.homeManagerModules.default
{
programs.xearthlayer = {
enable = true;
provider.type = "bing";
};
}
];
};
};
}The configuration is quite complex, doing it first time might be too challenging. Consider following manual installation first and creating first config interactively as per upstream's docs. Then you can move your config to Nix. Please read the Configuration Notes below as well.
{
programs.xearthlayer = {
enable = true;
provider = {
type = "bing"; # bing | go2 | google | apple | arcgis | mapbox | usgs
# googleApiKey = "..."; # required for type = "google"
# mapboxAccessToken = "..."; # required for type = "mapbox"
};
cache = {
directory = "/mnt/nvme/xearthlayer-cache";
memorySize = "4GB";
diskSize = "100GB";
diskIoProfile = "nvme"; # auto | hdd | ssd | nvme
};
texture = {
format = "bc1"; # bc1 (smaller) | bc3 (with alpha)
mipmaps = 5;
};
prefetch = {
enable = true;
mode = "auto"; # auto | aggressive | opportunistic | disabled
udpPort = 49002;
};
xplane.sceneryDir = "/home/pilot/X-Plane 12/Custom Scenery";
};
}| Option | Type | Default | Description |
|---|---|---|---|
enable |
bool | false |
Enable xearthlayer |
package |
package | pkgs.xearthlayer |
Package to use |
provider.type |
enum | "bing" |
Imagery provider |
provider.googleApiKey |
string | null |
Google Maps API key |
provider.mapboxAccessToken |
string | null |
MapBox access token |
cache.directory |
string | null |
Cache directory |
cache.memorySize |
string | null |
Memory cache size (e.g., "4GB") |
cache.diskSize |
string | null |
Disk cache size (e.g., "50GB") |
cache.diskIoProfile |
enum | null |
Disk I/O profile |
texture.format |
enum | null |
DDS compression format |
texture.mipmaps |
int | null |
Mipmap levels (1-10) |
prefetch.enable |
bool | null |
Enable tile prefetching |
prefetch.mode |
enum | null |
Prefetch mode |
prefetch.udpPort |
port | null |
X-Plane telemetry UDP port |
xplane.sceneryDir |
string | null |
X-Plane Custom Scenery directory |
- Installs xearthlayer to
home.packages - Generates
~/.xearthlayer/config.iniwith your settings
⚠️ FUSE requirement: xearthlayer uses FUSE to mount imagery. You must enable FUSE in your NixOS config:programs.fuse.userAllowOther = true;Alternatively, use
nixearthlayer.nixosModules.defaultwhich enables FUSE automatically (and adds the package toenvironment.systemPackages).
⚠️ Upstream changes: The xearthlayer configuration format may change between versions. This module covers common options but not all settings. If upstream adds new options or changes existing ones, you may need to configure them manually or wait for this flake to be updated.For the full list of configuration options, see the upstream documentation.
If you prefer not to use the module:
{ pkgs, nixearthlayer, ... }:
{
home.packages = [ nixearthlayer.packages.${pkgs.system}.xearthlayer ];
}Then run xearthlayer setup to create ~/.xearthlayer/config.ini interactively.
nix develop # Enter dev shell with Rust toolchain
nix build # Build the package
nix flake check # Run checksThis repository includes GitHub Actions that:
- Daily update check: Monitors upstream releases and creates PRs for new versions
- Build & cache: Builds on push/PR and pushes to Cachix
This flake is MIT licensed. xearthlayer itself is MIT licensed.
This is an unofficial Nix packaging of xearthlayer. I am not the author of xearthlayer and have no affiliation with the upstream project. For issues with xearthlayer itself, please refer to the upstream repository.