Skip to content

Confusion Between File System Paths and Store Paths #1206

@MichalKononenko2

Description

@MichalKononenko2

Observations

Section https://nix.dev/tutorials/nix-language#file-system-paths describes what Eelco's thesis https://edolstra.github.io/pubs/phd-thesis.pdf Section 5.2.2 store paths as file system paths. While learning nix, I was confused by this idea, since I assumed store paths would always point to my file system. What I eventually learned was that store paths as described in the nix language are, at least in my head, "many-faced paths".

I didn't understand that nix translates paths into store derivations, and therefore I didn't know why my xmonad.hs couldn't find a wallpaper.jpg located on my filesystem.

Problem

I was confused why paths were treated as primitive types in the nix language, and I didn't understand that nix maps these to store paths.

Approaches

Instead of calling these "File system paths", call these "Store paths" instead. Explain that these point to the filesystem when you're declaring the configuration, but that they get translated to store paths when derivations are built.

Willing to help?

Yes.

Priorities

Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    siteImprovements to the site infrastructure or content presentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions