How to look up the value of an option in a NixOS configuration

Sunday, the 12th of July 2026

nix eval --json --pretty .#nixosConfigurations.nemesis.config.home-manager.users.rafiq.xdg.mime

A little breakdown:

Putting it all together will give you an output like:

{
  "desktopFileUtilsPackage": "/nix/store/rfxvyxw9rksbhc2ppypqwv2lm0xz9drd-desktop-file-utils-0.28",
  "enable": true,
  "sharedMimeInfoPackage": "/nix/store/06m9bsgisc2dnl9dw7l3kzzzc1h862f1-shared-mime-info-2.4"
}

Neat! (this is mostly here because search did not turn up anything)