• tux7350@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    4 months ago

    Use nix repl! That stands for Read Eval Print Loop. You can evaluate a nix expression and see all the attributes inside. For example, on a non-flake system, use :l <nixpkgs/nixos> inside the repl to load the current system. Then you can hit the tab key to show whats inside of the current attribute set, make sure you have a . at the end. Then you can press enter to evaluate and see the declaration. For example when you set networking.hostName in configuration.nix you can actually find it under options.networking.hostName.value evaluating that in the repl.

    • sunstoned@lemmus.org
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 months ago

      Amazing! I’ve used that before but just to look for packages offline. I’ll definitely check that out.