Compare commits

..

No commits in common. "main" and "fix-upgrade-nix-command" have entirely different histories.

10 changed files with 60 additions and 123 deletions

View file

@ -31,7 +31,7 @@ to clusters of critical infrastructure. With this in mind, the Lix team has been
provide a collection of necessary improvements over CppNix:
- **Built for a community, not for a corporation.**
Lix is built by a team of open-source volunteers -- and exists to provide an alternative to the
Lix is built by a team of open-source volunteers -- and exists to provide a alternative to the
commercial interests that have long plagued both upstream CppNix and corporate-authored forks.
We're proud to stand by our open [conflict of interest statements](/team#conflict-of-interest-statements),
and proud to listen to community voices on issues of sponsorship, direction, and moderation.
@ -58,7 +58,7 @@ provide a collection of necessary improvements over CppNix:
- **A language with room to grow.**
Unlike upstream Nix, Lix intends to be an evolving language -- a robust language versioning
system will allow the language to grow and evolve without sacrificing backwards-compatibility or correctness.
And room to grow means room for **usability and ergonomics improvements** -- both in the language and in
And room to grow means room for **usability and ergonomics improvements** -- both in the langauge and in
tooling.

View file

@ -1,58 +1,13 @@
---
title: "Switching To Lix"
description: "or: how to make your existing configuration Delicious"
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**, there are
a couple of ways to switch to Lix, all of which are relatively easy.
- Using Lix from nixpkgs:
- Potentially slightly older version of Lix
- Working binary caching
- Programs like nix-eval-jobs and colmena still use the default version of
Nix (may be unacceptable depending on your use case)
- Using the Lix NixOS module:
- Fresh version of Lix right out of the freezer
- You will be compiling Lix yourself, for now at least
- Programs like nix-eval-jobs and colmena have the version of Nix they use
overridden by an overlay such that most of the system uses Lix.
# Using Lix from nixpkgs
This approach has some caveats: since it is not using an overlay, it does not
set the version of Nix depended on by other tools like colmena or
nix-eval-jobs. Consequently, those tools will be using whichever version of
CppNix is default in nixpkgs, likely leading to an inconsistent experience. It
is, however, easy, and it does not take the few minutes to compile Lix from
source.
Add the following code to your NixOS configuration:
```nix
{ pkgs, ... }:
{
nix.package = pkgs.lix;
}
```
That's it, you're done.
You can verify that it works by running the following command:
```sh
$ nix --version
nix (Lix, like Nix) 2.90.0-rc1
```
# Using the Lix NixOS module
The Lix NixOS module is the way to get the most consistent experience using
Lix, and to have a system that has Lix as the default Nix implementation
wherever possible by using an overlay to replace `pkgs.nix`. It will result in
building Lix from source, which takes a few minutes on every update, which is a
perfect time to get up, get some water, and stretch for a bit.
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
@ -65,10 +20,15 @@ Adding Lix to a flake-based configuration is relatively simple. First, add the L
# 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,
# which is often the case. If you've named it something else,
# you'll need to change the `nixpkgs` below.
lix = {
url = "git+https://git@git.lix.systems/lix-project/lix?ref=refs/tags/2.90-beta.1";
flake = false;
};
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0-rc1.tar.gz";
url = "git+https://git.lix.systems/lix-project/nixos-module";
inputs.lix.follows = "lix";
inputs.nixpkgs.follows = "nixpkgs";
};
@ -118,17 +78,12 @@ Add the Lix _NixOS Module_ to your configuration:
}
```
<!--
FIXME: the binary cache doesn't do much good given that everyone is running a
different nixpkgs than Lix is actually cached with during the release process.
We need a hydra to be able to fix that.
Finally, if you'd prefer not to build Lix yourself, you can add our binary cache.
Finally, if you'd prefer not to build Lix yourself, you can add our binary cache.
Add the following to any NixOS module in your configuration (e.g. `configuration.nix`):
```nix
{
nix.settings.substituters = [
nix.settings.extra-substituters = [
"https://cache.lix.systems"
];
@ -138,14 +93,12 @@ Add the following to any NixOS module in your configuration (e.g. `configuration
}
```
-->
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-rc1
nix (Lix, like Nix) 2.90.0-beta.0
```
As long as you see `Lix` in the output, you're good! If you're not sure what to do now, it's a
@ -158,7 +111,13 @@ If you're not using flakes, you can set up your configuration to automatically p
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
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, ... }:
@ -167,30 +126,20 @@ section, and add the line provided in the configuration
[ # Include the results of the hardware scan.
./hardware-configuration.nix
# This includes the Lix NixOS module in your configuration along with the
# matching version of Lix itself.
#
# The sha256 hashes were obtained with the following command in Lix (n.b.
# this relies on --unpack, which is only in Lix and CppNix > 2.18):
# nix store prefetch-file --name source --unpack https://git.lix.systems/lix-project/lix/archive/2.90.0-rc1.tar.gz
# This is the core line -- it pulls down the Lix module and
# includes it in your configuration. It looks much nicer with a let
# binding -- but for clarity, we'll leave that as an exercise for the
# reader. :)
#
# Note that the tag (e.g. v2.90) in the URL here is what determines
# which version of Lix you'll wind up with.
(let
module = fetchTarball {
name = "source";
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0-rc1.tar.gz";
sha256 = "sha256-64lB/NO6AQ6z6EDCemPSYZWX/Qc6Rt04cPia5T5v01g=";
};
lixSrc = fetchTarball {
name = "source";
url = "https://git.lix.systems/lix-project/lix/archive/2.90.0-rc1.tar.gz";
sha256 = "sha256-WY7BGnu5PnbK4O8cKKv9kvxwzZIGbIQUQLGPHFXitI0=";
};
# This is the core of the code you need; it is an exercise to the
# reader to write the sources in a nicer way, or by using npins or
# similar pinning tools.
in import "${module}/module.nix" { lix = lixSrc; }
(import
(
(fetchTarball { url = "https://git.lix.systems/lix-project/nixos-module/archive/main.tar.gz"; }) + "/module.nix"
)
{
lix = fetchTarball { url = "https://git.lix.systems/lix-project/lix/archive/2.90-beta.1.tar.gz"; };
}
)
];
@ -198,15 +147,12 @@ section, and add the line provided in the configuration
}
```
<!--
FIXME: as above, doesn't work, we should not recommend it.
Finally, if you'd prefer not to build Lix yourself, you can add our binary cache.
Finally, if you'd prefer not to build Lix yourself, you can add our binary cache.
Add the following to any NixOS module in your configuration (e.g. `configuration.nix`):
```nix
{
nix.settings.substituters = [
nix.settings.extra-substituters = [
"https://cache.lix.systems"
];
@ -215,14 +161,13 @@ Add the following to any NixOS module in your configuration (e.g. `configuration
];
}
```
-->
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-rc1-lixpre20240615-253546d
nix (Lix, like Nix) 2.90.0-beta.0
```
As long as you see `Lix` in the output, you're good! If you're not sure what to do now, it's a
@ -230,8 +175,8 @@ great time to check out some of the [community's resources on Nix](/resources).
## Having Trouble?
**One quick thing to check:** have you set `nix.package` anywhere in your configuration?
If so, your configuration option will override the Lix module. You'll want to remove it, first --
**One quick thing to check:** have you set `nix.package` anywhere in your configuration?
If so, your configuration option will override the Lix module. You'll want to remove it, first --
or, if you're feeling savvy, point it to the provided Lix package.
**Otherwise:** If you're having difficulty installing Lix, don't panic! Hop on over to our

View file

@ -44,9 +44,8 @@ We encourage working through conflicts privately with involved parties, but we a
If you wish to contact a member of the interim community team about a concern, consider contacting one of the following people:
- qyriad (@qyriad:katesiria.org)
- piegames (@piegames:flausch.social)
- ktemkin (@ktemkin:katesiria.org)
- jade (@jade_:matrix.org)
- qyriad (@qyriad:katesiria.org)
- hexchen (@hexchen:colon.at)
- lunaphied (@lunaphied:lunaphied.me)
- jade (@jade_:matrix.org)

View file

@ -8,7 +8,7 @@ author: "Lix Team"
Whether you're a new or returning user, **we're thrilled you've decided to pick up Lix!**
Lix works out-of-the-box on most Linux and MacOS systems, including with system management tools
such as [home-manager](https://github.com/nix-community/home-manager) and
such as [home-manager](https://github.com/nix-community/home-manager) and
[nix-darwin](https://github.com/LnL7/nix-darwin) -- but, like any Nix-based system, some Nix background
knowledge is recommended before installation.
@ -18,13 +18,15 @@ first, to get familiar with how Nix works.
## On NixOS
If you haven't already installed NixOS, do so using any upstream
[install image](https://nixos.org/download/#NixOS) and the instructions in the
[NixOS Manual](https://nixos.org/manual/nixos/stable/#sec-installation).
If you haven't already installed NixOS, do so using any upstream
[install image](https://nixos.org/download/#NixOS) and the instructions in the
[NixOS Manual](https://nixos.org/manual/nixos/stable/#sec-installation). Then, follow
the instructions for either:
Then, follow the [instructions to add Lix to your
configuration](/add-to-config). Both flake-based and non-flake-based
configurations are fully supported.
- [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 an Existing `nix-darwin` Install
@ -41,7 +43,7 @@ depending on how you prefer to configure your system.
## On Any Other Linux/MacOS System
You can either perform a **new install**, or choose to
You can either perform a **new install**, or choose to
**upgrade an existing install** to Lix.
### New Installs
@ -53,7 +55,7 @@ Open a terminal, and run the following command:
curl -sSf -L https://install.lix.systems/lix | sh -s -- install
```
The installer will guide you through installing Lix -- and once it's finished,
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).
@ -70,7 +72,7 @@ Thanks to Nix, we can actually ask Lix to upgrade your system directly. Run the
sudo --preserve-env=PATH nix run \
--experimental-features "nix-command flakes" \
--extra-substituters https://cache.lix.systems --extra-trusted-public-keys "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=" \
'git+https://git@git.lix.systems/lix-project/lix?ref=refs/tags/2.90.0-rc1' -- \
'git+https://git@git.lix.systems/lix-project/lix?ref=refs/tags/2.90-beta.1' -- \
upgrade-nix \
--extra-substituters https://cache.lix.systems --extra-trusted-public-keys "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o="
```
@ -80,7 +82,7 @@ to report its version:
```sh
$ nix --version
nix (Lix, like Nix) 2.90.0-rc1-lixpre20240615-253546d
nix (Lix, like Nix) 2.90.0-beta.1
```
As long as you see `Lix` in the output, you're good! If you're not sure what to do now, it's a
@ -94,4 +96,4 @@ If you're having difficulty installing Lix, don't panic! Hop on over to our
## 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](https://git.lix.systems/lix-project/lix-website/pulls)!
or to [make a pull request to our website](git@git.lix.systems:lix-project/lix-website.git)!

View file

@ -12,15 +12,6 @@ of the community.
We're also currently in the process of writing brand new documentation, which will be listed here
once available.
## A note of caution
Nix has a long history. Some things that seemed like good ideas once are no longer common practice. In particular:
- It's probably a good idea to ignore `nix-env` and mutable environments in favor of declarative configuration
- If you don't already use channels, it's probably a good idea to learn about flakes or some other pinning mechanism instead
If you're learning about those topics because you want to understand the ideas that are currently in favor in the historical contexts they are responses to, or because you think you see a benefit to them that others don't, that's totally fine; this warning is only here to help beginners have a fruitful experience.
## Understanding Nix
- [The official Nix ecosystem documentation](https://nix.dev), maintained by the **NixOS Foundation**.

View file

@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" viewBox="0 0 92 92"><defs><clipPath id="a"><path d="M0 .113h91.887V92H0Zm0 0"/></clipPath></defs><g clip-path="url(#a)"><path style="stroke:none;fill-rule:nonzero;fill:#f03c2e;fill-opacity:1" d="M90.156 41.965 50.036 1.848a5.918 5.918 0 0 0-8.372 0l-8.328 8.332 10.566 10.566a7.03 7.03 0 0 1 7.23 1.684 7.034 7.034 0 0 1 1.669 7.277l10.187 10.184a7.028 7.028 0 0 1 7.278 1.672 7.04 7.04 0 0 1 0 9.957 7.05 7.05 0 0 1-9.965 0 7.044 7.044 0 0 1-1.528-7.66l-9.5-9.497V59.36a7.04 7.04 0 0 1 1.86 11.29 7.04 7.04 0 0 1-9.957 0 7.04 7.04 0 0 1 0-9.958 7.06 7.06 0 0 1 2.304-1.539V33.926a7.049 7.049 0 0 1-3.82-9.234L29.242 14.272 1.73 41.777a5.925 5.925 0 0 0 0 8.371L41.852 90.27a5.925 5.925 0 0 0 8.37 0l39.934-39.934a5.925 5.925 0 0 0 0-8.371"/></g></svg>
<svg xmlns="http://www.w3.org/2000/svg" width="92pt" height="92pt" viewBox="0 0 92 92"><defs><clipPath id="a"><path d="M0 .113h91.887V92H0Zm0 0"/></clipPath></defs><g clip-path="url(#a)"><path style="stroke:none;fill-rule:nonzero;fill:#f03c2e;fill-opacity:1" d="M90.156 41.965 50.036 1.848a5.918 5.918 0 0 0-8.372 0l-8.328 8.332 10.566 10.566a7.03 7.03 0 0 1 7.23 1.684 7.034 7.034 0 0 1 1.669 7.277l10.187 10.184a7.028 7.028 0 0 1 7.278 1.672 7.04 7.04 0 0 1 0 9.957 7.05 7.05 0 0 1-9.965 0 7.044 7.044 0 0 1-1.528-7.66l-9.5-9.497V59.36a7.04 7.04 0 0 1 1.86 11.29 7.04 7.04 0 0 1-9.957 0 7.04 7.04 0 0 1 0-9.958 7.06 7.06 0 0 1 2.304-1.539V33.926a7.049 7.049 0 0 1-3.82-9.234L29.242 14.272 1.73 41.777a5.925 5.925 0 0 0 0 8.371L41.852 90.27a5.925 5.925 0 0 0 8.37 0l39.934-39.934a5.925 5.925 0 0 0 0-8.371"/></g></svg>

Before

Width:  |  Height:  |  Size: 820 B

After

Width:  |  Height:  |  Size: 820 B

View file

@ -1,4 +1,4 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16px" height="17.15px" viewBox="0 0 216.4144 232.00976">
<svg xmlns="http://www.w3.org/2000/svg" width="61.076954mm" height="65.47831mm" viewBox="0 0 216.4144 232.00976">
<path fill="#2b90d9" d="M211.80734 139.0875c-3.18125 16.36625-28.4925 34.2775-57.5625 37.74875-15.15875 1.80875-30.08375 3.47125-45.99875 2.74125-26.0275-1.1925-46.565-6.2125-46.565-6.2125 0 2.53375.15625 4.94625.46875 7.2025 3.38375 25.68625 25.47 27.225 46.39125 27.9425 21.11625.7225 39.91875-5.20625 39.91875-5.20625l.8675 19.09s-14.77 7.93125-41.08125 9.39c-14.50875.7975-32.52375-.365-53.50625-5.91875C9.23234 213.82 1.40609 165.31125.20859 116.09125c-.365-14.61375-.14-28.39375-.14-39.91875 0-50.33 32.97625-65.0825 32.97625-65.0825C49.67234 3.45375 78.20359.2425 107.86484 0h.72875c29.66125.2425 58.21125 3.45375 74.8375 11.09 0 0 32.975 14.7525 32.975 65.0825 0 0 .41375 37.13375-4.59875 62.915"/>
<path fill="#fff" d="M177.50984 80.077v60.94125h-24.14375v-59.15c0-12.46875-5.24625-18.7975-15.74-18.7975-11.6025 0-17.4175 7.5075-17.4175 22.3525v32.37625H96.20734V85.42325c0-14.845-5.81625-22.3525-17.41875-22.3525-10.49375 0-15.74 6.32875-15.74 18.7975v59.15H38.90484V80.077c0-12.455 3.17125-22.3525 9.54125-29.675 6.56875-7.3225 15.17125-11.07625 25.85-11.07625 12.355 0 21.71125 4.74875 27.8975 14.2475l6.01375 10.08125 6.015-10.08125c6.185-9.49875 15.54125-14.2475 27.8975-14.2475 10.6775 0 19.28 3.75375 25.85 11.07625 6.36875 7.3225 9.54 17.22 9.54 29.675"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -1,4 +1,4 @@
<svg version="1.1" viewBox="0 0 27.9 32" width="16px" height="18px" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<svg version="1.1" viewBox="0 0 27.9 32" xmlns="http://www.w3.org/2000/svg" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<title>Matrix (protocol) logo</title>
<g transform="translate(-.095 .005)" fill="#040404">
<path d="m27.1 31.2v-30.5h-2.19v-0.732h3.04v32h-3.04v-0.732z"/>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -10,7 +10,7 @@
{{ end }}
</div>
</div>
<div class="row g-4 g-md-5">
<div class="row g-5">
{{ range .content.cards }}
<div class="col-12 col-xl-4">
<div class="card bg-blue-16 border-0 border-radius-34 p-4">

View file

@ -6,7 +6,7 @@
<p class="small text-black-61">{{ .Site.Params.description }}</p>
{{ with .Site.Params.social }}
<ul class="d-flex justify-content-center justify-content-xl-start list-unstyled">
{{ with .mastodon }}<li class="rounded-circle bg-blue-63 me-2 p-2"><a rel="me" class="d-flex align-items-center justify-content-center size-16 svglogo" href="{{ . }}">{{ partial "icons/mastodon.html" }}</a></li>{{ end }}
{{ with .mastodon }}<li class="rounded-circle bg-blue-63 me-2 p-2"><a class="d-flex align-items-center justify-content-center size-16 svglogo" href="{{ . }}">{{ partial "icons/mastodon.html" }}</a></li>{{ end }}
{{ with .matrix }}<li class="rounded-circle bg-blue-63 me-2 p-2"><a class="d-flex align-items-center justify-content-center size-16 svglogo" href="{{ . }}">{{ partial "icons/matrix.html" }}</a></li>{{ end }}
{{ with .github }}<li class="rounded-circle bg-blue-63 me-2 p-2"><a class="d-flex align-items-center justify-content-center size-16 svglogo" href="{{ . }}">{{ partial "icons/github.html" }}</a></li>{{ end }}
{{ with .git }}<li class="rounded-circle bg-blue-63 me-2 p-2"><a class="d-flex align-items-center justify-content-center size-16 svglogo" href="{{ . }}">{{ partial "icons/git.html" }}</a></li>{{ end }}