Skip to content

Commit

Permalink
docs(nixos): update substituter metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
soopyc committed Jun 7, 2024
1 parent 4c8fc00 commit 3578245
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions docs/distributions/nixos/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ In the installation environment, the hydra cache is not currently used by defaul

```shell
# since root is a trusted user, we do not need to add extra-trusted-substituters.
extra-substituters = https://hydra.soopy.moe
extra-trusted-public-keys = hydra.soopy.moe:IZ/bZ1XO3IfGtq66g+C85fxU/61tgXLaJ2MlcGGXU8Q=
extra-substituters = https://cache.soopy.moe
extra-trusted-public-keys = cache.soopy.moe-1:0RZVsQeR+GOh0VQI9rvnHz55nVXkFardDqfm4+afjPo=
```

=== "Passing additional flags"
Expand All @@ -47,7 +47,7 @@ In the installation environment, the hydra cache is not currently used by defaul
For each `nixos-{rebuild,install}` command, pass in the flags as shown below.

```shell
nixos-install --option extra-substituters "https://hydra.soopy.moe" --option extra-trusted-public-keys "hydra.soopy.moe:IZ/bZ1XO3IfGtq66g+C85fxU/61tgXLaJ2MlcGGXU8Q="
nixos-install --option extra-substituters "https://cache.soopy.moe" --option extra-trusted-public-keys "cache.soopy.moe-1:0RZVsQeR+GOh0VQI9rvnHz55nVXkFardDqfm4+afjPo="
```

=== "Using flakes"
Expand All @@ -56,8 +56,8 @@ In the installation environment, the hydra cache is not currently used by defaul
```nix title="flake.nix" linenums="1" hl_lines="2-5"
{
nixConfig = {
extra-substituters = ["https://hydra.soopy.moe"];
extra-trusted-public-keys = ["hydra.soopy.moe:IZ/bZ1XO3IfGtq66g+C85fxU/61tgXLaJ2MlcGGXU8Q="];
extra-substituters = ["https://cache.soopy.moe"];
extra-trusted-public-keys = ["cache.soopy.moe-1:0RZVsQeR+GOh0VQI9rvnHz55nVXkFardDqfm4+afjPo="];
};
inputs = ...;
outputs = ...;
Expand All @@ -70,7 +70,7 @@ In the installation environment, the hydra cache is not currently used by defaul

If you are using the legacy setup with channels, you might still be building the kernel even if you have the substituter set up. This is because the ISO's nixpkgs flake input takes precedence over channels.

A set up with flakes is obviously still recommended as this problem would be circumvented, but if you cannot or don't want to use flakes, here are the steps to install with the substituter.
A set up with flakes is obviously still recommended various pitfalls such as this problem would be circumvented. If you for some reason cannot or don't want to use flakes, here are the steps to install with the substituter.

```bash
# Ensure you are using nixos-unstable.or the latest stable nixos release.
Expand All @@ -90,10 +90,10 @@ You do not have to perform this step if you use the flake template.
```nix linenums="1" hl_lines="2-7"
{ ... }: {
nix.settings = {
substituters = [ "https://hydra.soopy.moe" ];
trusted-substituters = [ "https://hydra.soopy.moe" ]; # to allow building as a non-trusted user
substituters = [ "https://cache.soopy.moe" ];
trusted-substituters = [ "https://cache.soopy.moe" ]; # to allow building as a non-trusted user
trusted-public-keys =
[ "hydra.soopy.moe:IZ/bZ1XO3IfGtq66g+C85fxU/61tgXLaJ2MlcGGXU8Q=" ];
[ "cache.soopy.moe-1:0RZVsQeR+GOh0VQI9rvnHz55nVXkFardDqfm4+afjPo=" ];
};
}
```

0 comments on commit 3578245

Please sign in to comment.