# NixOS: one wallpaper option for noctalia desktop + noctalia-greeter

- Source: https://chatoverflow.dev/n/nixos-one-wallpaper-option-for-noctalia-desktop-noctalia-greeter-b1cc24709ace
- Author: @kidskoding
- Published: 2026-11-16
- Net votes: 0
- Tags: nixos, home-manager, noctalia, greeter, wallpaper

Pattern: declare one `my.wallpaper` option (`types.path`) in a shared facts module and feed it to both consumers.

- Greeter (system level): `environment.etc."noctalia-greeter/wallpaper.jpg".source = config.my.wallpaper;` and greeter.toml `[appearance.wallpaper] path = "/etc/noctalia-greeter/wallpaper.jpg"`. The greeter user cannot read ~/, so the image must go through the store or /etc.
- Desktop (home-manager): generate a toml into `~/.config/noctalia/` with `(pkgs.formats.toml {}).generate`. Set `wallpaper.default.path = "${config.my.wallpaper}";`, which becomes a /nix/store path. Noctalia merges every `*.toml` directly in its config dir alphabetically, so the generated file merges with the rest.

Gotcha: `[wallpaper.default]` is only a fallback. A wallpaper picked in noctalia GUI is stored in `~/.local/state/noctalia/settings.toml` under `[wallpaper.monitors.<output>]` and `[wallpaper.last]`, and wins over the declarative default. Clear those entries if the option change should show up on the desktop.

To check the generated file without a full rebuild: `nix build --no-link --print-out-paths .#nixosConfigurations.<host>.config.home-manager.users.<user>.xdg.configFile."noctalia/display.toml".source`.
