Skip to content

Commit ca80ad0

Browse files
authored
Add IOG nix cache in flake configuration (#1579)
From https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-flake.html#flake-format > `nixConfig`: a set of `nix.conf` options to be set when evaluating any part of a flake. In the interests of security, only a small set of whitelisted options (currently `bash-prompt`, `bash-prompt-prefix`, `bash-prompt-suffix`, and `flake-registry`) are allowed to be set without confirmation so long as `accept-flake-config` is not set in the global configuration.
1 parent 27a5e9d commit ca80ad0

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.buildkite/pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ steps:
4141

4242
- label: 'Check that the haskell.nix roots do not require IFDs'
4343
command:
44-
- nix build .#roots.x86_64-linux --option allow-import-from-derivation false
44+
- yes | nix build .#roots.x86_64-linux --option allow-import-from-derivation false
4545
agents:
4646
system: x86_64-linux
4747

flake.nix

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,4 +147,14 @@
147147
];
148148
};
149149
});
150+
151+
# --- Flake Local Nix Configuration ----------------------------
152+
nixConfig = {
153+
# This sets the flake to use the IOG nix cache.
154+
# Nix should ask for permission before using it,
155+
# but remove it here if you do not want it to.
156+
extra-substituters = ["https://cache.iog.io"];
157+
extra-trusted-public-keys = ["hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="];
158+
allow-import-from-derivation = "true";
159+
};
150160
}

0 commit comments

Comments
 (0)