Compare commits
2 commits
d0062aeff4
...
73fccad36a
Author | SHA1 | Date | |
---|---|---|---|
73fccad36a | |||
224fda32d1 |
6
TODO.md
6
TODO.md
|
@ -3,7 +3,8 @@ TODO List
|
|||
|
||||
## Misc
|
||||
|
||||
- Fix the TODO FIXME section of existing installs.
|
||||
- Fix the TODO FIXME section of install / existing installs.
|
||||
- Fix the TODO FIXME section of add-to-config / non-flake.
|
||||
- Figure out what to replace the location section with.
|
||||
- Fill out the "contact us" section on the main page.
|
||||
- Figure out any legalese we need on the main page.
|
||||
|
@ -13,7 +14,6 @@ TODO List
|
|||
|
||||
## Pages
|
||||
|
||||
- Create the `/install` page.
|
||||
- Create the `/resources` page, with resources for learning Nix.
|
||||
- Create the /team page and include CoI declarations.
|
||||
- Figure out where to link the "Docs" link to.
|
||||
|
@ -31,4 +31,4 @@ TODO List
|
|||
|
||||
# Wishlist
|
||||
|
||||
- Screenshots (incl. maybe of Xil) showing ergonomics enhancements.
|
||||
- Screenshots (incl. maybe of Xil) showing ergonomics enhancements in the /about page.
|
||||
|
|
|
@ -1,11 +1,138 @@
|
|||
---
|
||||
title: "Adding Lix to Your Config"
|
||||
title: "Switching To Lix"
|
||||
description: "or: how to make your existing configruation Delicious"
|
||||
date: "2024-04-27"
|
||||
author: "Lix Team"
|
||||
---
|
||||
|
||||
If you have an existing configuration on **NixOS** or **nix-darwin**, the easiest way
|
||||
to switch to Lix is currently by using our provided _NixOS module_. Fortunately, this
|
||||
usually means adding only a couple of lines to your configuration.
|
||||
|
||||
## Flake-based Configurations
|
||||
|
||||
Adding Lix to a flake-based configuration is relatively simple. First, add the Lix module to your _flake inputs_:
|
||||
|
||||
```nix
|
||||
{
|
||||
inputs = {
|
||||
|
||||
# Add this section to your flake inputs!
|
||||
#
|
||||
# Note that this assumes you have a flake-input called nixpkgs,
|
||||
# which is often the case. If you've named it something else,
|
||||
# you'll need to change the `nixpkgs` below.
|
||||
lix-module = {
|
||||
url = "git+https://git.lix.systems/lix-project/nixos-module";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
# <rest of configuration ommitted>
|
||||
}
|
||||
```
|
||||
|
||||
Next, add the `lix-module` as one of the arguments to your output function:
|
||||
|
||||
```nix
|
||||
{
|
||||
# <configuration above omitted>
|
||||
|
||||
# Add the `lix-module` argument to your output function, as below:
|
||||
outputs = {nixpkgs, lix-module, ...}: {
|
||||
# <rest of configuration ommitted>
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Finally, add the Lix _NixOS Module_ to your configuration:
|
||||
|
||||
```nix
|
||||
{
|
||||
# <configuration above omitted>
|
||||
|
||||
# Add the `lix-module` argument to your output function, as below:
|
||||
outputs = {nixpkgs, lix-module, ...}: {
|
||||
|
||||
# The configuration here is an example; it will look slightly different
|
||||
# based on your platform (NixOS, nix-darwin) and architecture.
|
||||
nixosConfigurations.your-box = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux"
|
||||
|
||||
modules = [
|
||||
|
||||
# This is the important part -- add this line to your module list!
|
||||
lix-module.nixosModules.default
|
||||
];
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
# <configuration below ommitted>
|
||||
}
|
||||
```
|
||||
|
||||
Rebuild and switch into your new system (either using `nixos-rebuild` or `darwin-rebuild`).
|
||||
You should now be using Lix! You can verify this by asking the `nix` command to report its version:
|
||||
|
||||
```sh
|
||||
$ nix --version
|
||||
nix (Lix, like Nix) 2.90.0-lix
|
||||
```
|
||||
|
||||
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).
|
||||
|
||||
|
||||
## Non-Flake Configurations
|
||||
|
||||
If you're not using flakes, you can set up your configuration to automatically pull down a
|
||||
Lix release tarball, and then add it to your `configuration.nix`.
|
||||
|
||||
Open your `/etc/nixos/configuration.nix` in the editor of your choice. Find the `imports`
|
||||
section, and add the line provided in the configuration
|
||||
|
||||
<mark>
|
||||
<b>This section is currently pending on a quick update.</b>
|
||||
</mark>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
```nix
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
|
||||
# This is the core line -- it pulls down the Lix module and
|
||||
# includes it in your configuration.
|
||||
#
|
||||
# Note that the tag (e.g. v2.90) in the URL here is what determines
|
||||
# which version of Lix you'll wind up with.
|
||||
# *** TODO FIXME ***
|
||||
(import "${your-pinning-thingy.lix-nixos-module}/module.nix" {
|
||||
lix = your-pinning-thingy.lix;
|
||||
})
|
||||
];
|
||||
|
||||
# <configuration below ommitted>
|
||||
}
|
||||
```
|
||||
|
||||
Rebuild and switch into your new system (either using `nixos-rebuild` or `darwin-rebuild`).
|
||||
You should now be using Lix! You can verify this by asking the `nix` command to report its version:
|
||||
|
||||
```sh
|
||||
$ nix --version
|
||||
nix (Lix, like Nix) 2.90.0-lix
|
||||
```
|
||||
|
||||
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.
|
||||
|
|
|
@ -52,13 +52,15 @@ The easiest way to install Lix is to use the [Lix Installer](https://git.lix.sys
|
|||
Open a terminal, and run the following command:
|
||||
|
||||
```sh
|
||||
$ curl -sSf -L https://install.lix.systems/lix | sh -s -- install
|
||||
curl -sSf -L https://install.lix.systems/lix | sh -s -- install
|
||||
```
|
||||
|
||||
The installer will guide you through installing Lix -- and once it's finished,
|
||||
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 [Determinant Nix Installer](https://github.com/DeterminateSystems/nix-installer).
|
||||
|
||||
### Existing Installs
|
||||
|
||||
If you have an existing Nix installation, you should be able to upgrade by using a variant
|
||||
|
@ -70,19 +72,14 @@ of the `upgrade-nix` command.
|
|||
<br/>
|
||||
<br/>
|
||||
|
||||
**If you have flakes enabled**, the following command should perform an upgrade:
|
||||
Thanks to Nix, we can actually ask Lix to upgrade your system directly. Run the following command:
|
||||
|
||||
```sh
|
||||
$ sudo nix run 'https://git.lix.systems/lix-project/lix' -- upgrade-nix
|
||||
sudo nix run --extra-experimental-features "nix-command flakes" \
|
||||
"git+https://git.lix.systems/lix-project/lix" -- upgrade-nix
|
||||
```
|
||||
|
||||
**If you don't have flakes enabled**, you can perform a slightly more complex command:
|
||||
|
||||
```sh
|
||||
$ ***TODO FIXME***
|
||||
```
|
||||
|
||||
You should now have an upgraded version of Nix. You can verify this by asking Lix
|
||||
You should now have upgraded to Lix! You can verify this by asking the `nix` command
|
||||
to report its version:
|
||||
|
||||
```sh
|
||||
|
@ -98,4 +95,7 @@ great time to check out some of the [community's resources on Nix](/resources).
|
|||
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.
|
||||
|
||||
[^1]: a customized variant of the [Determinant Nix Installer](https://github.com/DeterminateSystems/nix-installer).
|
||||
## Feedback?
|
||||
|
||||
If you have thoughts on these instructions, feel free to drop by our [community](/community),
|
||||
or to [make a pull request to our website](git@git.lix.systems:lix-project/lix-website.git)!
|
||||
|
|
|
@ -24,4 +24,4 @@ content:
|
|||
text: "Lix can also be used as the core Nix implementation for Nix-based operating systems and system managers, including the full NixOS distribution, as well as system management software like Home Manager or nix-darwin."
|
||||
button:
|
||||
label: "use lix with NixOS"
|
||||
url: "/install#on-nixos"
|
||||
url: "/add-to-config"
|
||||
|
|
Loading…
Reference in a new issue