Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Latest commit

 

History

History
20 lines (13 loc) · 943 Bytes

nix.md

File metadata and controls

20 lines (13 loc) · 943 Bytes

Setting up Nix and flakes

Here is the wiki page if you would rather use that than the instructions here.

If you already have Nix installed and you don't want upgrade the version on your system, you can use nixf. If you use nixf, you do not need to follow the instructions below. Keep in mind, for all example that use the nix command, you'll need to use the nixf command.

Non-NixOS

  • Install Nix
  • Upgrade to the unstable version
    nix-env -iA nixpkgs.nixUnstable
  • Add the following line to either ~/.config/nix/nix.conf or /etc/nix/nix.conf (create the file if it doesn't exist).
    experimental-features = nix-command flakes

NixOS

Set the following options in your configuration.nix:

  • nix.package = pkgs.nixUnstable
  • nix.extraOptions = "experimental-features = nix-command flakes"