2024-04-28 02:32:25 +00:00
|
|
|
---
|
|
|
|
title: "Installing Lix"
|
|
|
|
description: "or: how to make your configuration Delicious"
|
|
|
|
date: "2024-04-27"
|
|
|
|
author: "Lix Team"
|
|
|
|
---
|
|
|
|
|
2024-07-10 20:43:09 +00:00
|
|
|
<!--
|
|
|
|
HI!!!
|
|
|
|
The file install.md is generated by update_version.py by
|
|
|
|
substituting values into install.md.in.
|
|
|
|
|
|
|
|
Please don't edit install.md directly!
|
|
|
|
-->
|
|
|
|
|
2024-05-06 02:48:34 +00:00
|
|
|
Whether you're a new or returning user, **we're thrilled you've decided to pick up Lix!**
|
2024-04-28 02:32:25 +00:00
|
|
|
|
2024-05-06 02:48:34 +00:00
|
|
|
Lix works out-of-the-box on most Linux and MacOS systems, including with system management tools
|
2024-06-19 12:52:28 +00:00
|
|
|
such as [home-manager](https://github.com/nix-community/home-manager) and
|
2024-05-06 02:48:34 +00:00
|
|
|
[nix-darwin](https://github.com/LnL7/nix-darwin) -- but, like any Nix-based system, some Nix background
|
|
|
|
knowledge is recommended before installation.
|
2024-04-28 02:32:25 +00:00
|
|
|
|
2024-05-06 02:48:34 +00:00
|
|
|
If you're new to the Nix ecosystem, you may want to check out some [community resources](/resources)
|
|
|
|
first, to get familiar with how Nix works.
|
|
|
|
|
|
|
|
|
|
|
|
## On NixOS
|
|
|
|
|
2024-06-19 12:52:28 +00:00
|
|
|
If you haven't already installed NixOS, do so using any upstream
|
|
|
|
[install image](https://nixos.org/download/#NixOS) and the instructions in the
|
2024-06-24 08:27:36 +00:00
|
|
|
[NixOS Manual](https://nixos.org/manual/nixos/stable/#sec-installation).
|
2024-05-06 02:48:34 +00:00
|
|
|
|
2024-06-24 08:27:36 +00:00
|
|
|
Then, follow the [instructions to add Lix to your
|
|
|
|
configuration](/add-to-config). Both flake-based and non-flake-based
|
|
|
|
configurations are fully supported.
|
2024-05-06 02:48:34 +00:00
|
|
|
|
|
|
|
|
|
|
|
## On an Existing `nix-darwin` Install
|
|
|
|
|
|
|
|
If you already have a [nix-darwin](https://github.com/LnL7/nix-darwin) installation, you
|
|
|
|
can use the same instructions as installing on a NixOS-based system. Follow the instructions
|
|
|
|
for either:
|
|
|
|
|
|
|
|
- [flake-based configurations](/add-to-config#flake-based-configurations); or
|
|
|
|
- [non-flake configurations](/add-to-config#non-flake-configurations)
|
|
|
|
|
|
|
|
depending on how you prefer to configure your system.
|
|
|
|
|
|
|
|
|
|
|
|
## On Any Other Linux/MacOS System
|
|
|
|
|
2024-06-19 12:52:28 +00:00
|
|
|
You can either perform a **new install**, or choose to
|
2024-05-06 02:48:34 +00:00
|
|
|
**upgrade an existing install** to Lix.
|
|
|
|
|
|
|
|
### New Installs
|
|
|
|
|
|
|
|
The easiest way to install Lix is to use the [Lix Installer](https://git.lix.systems/lix-project/lix-installer)[^1].
|
|
|
|
Open a terminal, and run the following command:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
curl -sSf -L https://install.lix.systems/lix | sh -s -- install
|
|
|
|
```
|
|
|
|
|
2024-06-19 12:52:28 +00:00
|
|
|
The installer will guide you through installing Lix -- and once it's finished,
|
2024-05-06 02:48:34 +00:00
|
|
|
you'll have a full, working installation. If you're not sure what to do, now is a
|
|
|
|
great time to check out some of the [community's resources on Nix](/resources).
|
|
|
|
|
|
|
|
[^1]: a customized variant of the [Determinate Nix Installer](https://github.com/DeterminateSystems/nix-installer).
|
|
|
|
|
|
|
|
### Existing Installs
|
|
|
|
|
2024-08-10 04:56:14 +00:00
|
|
|
If you have an existing Nix installation (either CppNix or Lix), you should be able to upgrade by using a variant
|
2024-05-06 02:48:34 +00:00
|
|
|
of the `upgrade-nix` command.
|
|
|
|
|
|
|
|
Thanks to Nix, we can actually ask Lix to upgrade your system directly. Run the following command:
|
|
|
|
|
|
|
|
```sh
|
2024-05-19 21:50:24 +00:00
|
|
|
sudo --preserve-env=PATH nix run \
|
2024-05-06 02:48:34 +00:00
|
|
|
--experimental-features "nix-command flakes" \
|
2024-05-19 21:35:02 +00:00
|
|
|
--extra-substituters https://cache.lix.systems --extra-trusted-public-keys "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=" \
|
2024-10-19 02:06:15 +00:00
|
|
|
'git+https://git.lix.systems/lix-project/lix?ref=refs/tags/2.91.1' -- \
|
2024-05-19 21:35:02 +00:00
|
|
|
upgrade-nix \
|
|
|
|
--extra-substituters https://cache.lix.systems --extra-trusted-public-keys "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o="
|
2024-05-06 02:48:34 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
You should now have upgraded to Lix! You can verify this by asking the `nix` command
|
|
|
|
to report its version:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
$ nix --version
|
2024-10-19 02:06:15 +00:00
|
|
|
nix (Lix, like Nix) 2.91.1
|
2024-05-06 02:48:34 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
As long as you see `Lix` in the output, you're good! If you're not sure what to do now, it's a
|
|
|
|
great time to check out some of the [community's resources on Nix](/resources).
|
|
|
|
|
|
|
|
## Having Trouble?
|
|
|
|
|
|
|
|
If you're having difficulty installing Lix, don't panic! Hop on over to our
|
|
|
|
[community page](/community), and check out the various ways to find help.
|
|
|
|
|
|
|
|
## Feedback?
|
|
|
|
|
|
|
|
If you have thoughts on these instructions, feel free to drop by our [community](/community),
|
2024-05-25 07:45:56 +00:00
|
|
|
or to [make a pull request to our website](https://git.lix.systems/lix-project/lix-website/pulls)!
|