wiki/_next/data/Ie9t5zutrXP6Of75Cb5xF/tools.nix.flakes.json

1 line
32 KiB
JSON
Raw Normal View History

2022-07-29 15:41:17 +00:00
{"pageProps":{"metadata":{"date":"2021-07-18 22:34:11 +08:00","date_modified":"2022-05-22 21:24:01 +08:00","language":"en","source":""},"title":"Nix flakes","hast":{"type":"root","children":[{"type":"element","tagName":"nav","properties":{"className":"toc"},"children":[{"type":"element","tagName":"ol","properties":{"className":"toc-level toc-level-1"},"children":[{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"exploring-a-nix-flake"},"children":[{"type":"text","value":"Exploring a Nix flake"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/tools.nix.flakes#exploring-a-nix-flake"},"children":[{"type":"text","value":"Exploring a Nix flake"}]}]},{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"selected-list-of-attributes-for-outputs"},"children":[{"type":"text","value":"Selected list of attributes for outputs"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/tools.nix.flakes#selected-list-of-attributes-for-outputs"},"children":[{"type":"text","value":"Selected list of attributes for outputs"}]}]},{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"flake-templates"},"children":[{"type":"text","value":"Flake templates"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/tools.nix.flakes#flake-templates"},"children":[{"type":"text","value":"Flake templates"}]}]},{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"nix-registry"},"children":[{"type":"text","value":"Nix registry"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/tools.nix.flakes#nix-registry"},"children":[{"type":"text","value":"Nix registry"}]}]},{"type":"element","tagName":"li","data":{"hookArgs":[{"type":"element","tagName":"h1","properties":{"id":"more-information-about-flakes"},"children":[{"type":"text","value":"More information about flakes"}]}]},"properties":{"className":"toc-item toc-item-h1"},"children":[{"type":"element","tagName":"a","properties":{"className":"toc-link toc-link-h1","href":"/tools.nix.flakes#more-information-about-flakes"},"children":[{"type":"text","value":"More information about flakes"}]}]}]}]},{"type":"element","tagName":"div","properties":{"className":["special-block","block-note"]},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"As of 2021-06-30, the version used for this note is at v2.3 so it needs to be invoked with the unstable version.\n"}]}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"What are Nix flakes?\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"A self-contained Nix module that takes inputs (can be from other flakes) and create outputs.\nIt is comparable to "},{"type":"element","tagName":"a","properties":{"href":"https://guix.gnu.org/manual/en/html_node/Channels.html"},"children":[{"type":"text","value":"Guix channels"}]},{"type":"text","value":" (or the NUR) in the way any arbitrary value can be exported, thus extending a Nix module in any direction the author can make it to.\nAlso, it supercedes Nix channels as a way to manage your system.\n"}]},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"So, why use flakes?\n"}]},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"element","tagName":"li","properties":{},"children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Since it is self-contained, it is easier to compose and develop environments for projects.\n"}