Skip to content

Add IOG nix cache in flake configuration #1579

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 27, 2022

Conversation

yvan-sraka
Copy link
Contributor

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.

@yvan-sraka yvan-sraka requested a review from hamishmack August 8, 2022 08:41
@yvan-sraka yvan-sraka self-assigned this Aug 8, 2022
@yvan-sraka yvan-sraka marked this pull request as ready for review August 8, 2022 12:23
@yvan-sraka
Copy link
Contributor Author

bors try

iohk-bors bot added a commit that referenced this pull request Aug 8, 2022
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Aug 9, 2022

try

Timed out.

@yvan-sraka
Copy link
Contributor Author

The issue here is that interactive user confirmation of using IOG cache currently stuck the CI … solutions could be to:

  • add IOG cache to global Nix configuration of CI (if such thing possible?)
  • tweak CI scripts to pass the desired interactive input (or find the Nix non-interactive CLI option)

@yvan-sraka yvan-sraka marked this pull request as draft August 10, 2022 07:58
yvan-sraka added a commit that referenced this pull request Aug 22, 2022
This should unstuck both #1579 and #1601 ...

n.b. This is enable only when `CI` env variable is set, to not bother
normal users in their interactive tests ;)
yvan-sraka added a commit that referenced this pull request Aug 22, 2022
This should unstuck both #1579 and #1601 ...

n.b. This is enabled only when `CI` env variable is set, to not bother
normal users in their interactive tests ;)
yvan-sraka added a commit that referenced this pull request Aug 22, 2022
This should unstuck both #1579 and #1601 ...

n.b. This is enabled only when `CI` env variable is set, to not bother
normal users in their interactive tests ;)
hamishmack pushed a commit that referenced this pull request Aug 22, 2022
This should unstuck both #1579 and #1601 ...

n.b. This is enabled only when `CI` env variable is set, to not bother
normal users in their interactive tests ;)
@yvan-sraka
Copy link
Contributor Author

bors try

iohk-bors bot added a commit that referenced this pull request Aug 26, 2022
@yvan-sraka yvan-sraka marked this pull request as ready for review August 26, 2022 09:39
@hamishmack
Copy link
Collaborator

It looks like this has broken one of the old build kite tests that was actually using the flake. It now asks for input from user.

See https://buildkite.com/input-output-hk/haskell-dot-nix/builds/7008#0182d985-68d6-4650-a955-8975b87c9ae8

@hamishmack
Copy link
Collaborator

bors try-

@yvan-sraka
Copy link
Contributor Author

I could add the same local nix.conf hack to another shell script or give a try to:

yes | nix build .#roots.x86_64-linux --option allow-import-from-derivation false

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.
@yvan-sraka yvan-sraka force-pushed the flake-local-nix-configuration branch from f6bd524 to dc2fb4d Compare August 26, 2022 12:39
@hamishmack
Copy link
Collaborator

bors try

@hamishmack
Copy link
Collaborator

bors try-

@hamishmack
Copy link
Collaborator

bors try

1 similar comment
@hamishmack
Copy link
Collaborator

bors try

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Aug 26, 2022

try

Already running a review

@hamishmack
Copy link
Collaborator

bors try-

@hamishmack
Copy link
Collaborator

bors try

@hamishmack
Copy link
Collaborator

bors try

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Aug 26, 2022

try

Already running a review

@hamishmack
Copy link
Collaborator

bors try-

@hamishmack
Copy link
Collaborator

bors try

@hamishmack
Copy link
Collaborator

bors try-

1 similar comment
@hamishmack
Copy link
Collaborator

bors try-

@hamishmack
Copy link
Collaborator

bors try

@hamishmack
Copy link
Collaborator

Oh it started #1601.

iohk-bors bot added a commit that referenced this pull request Aug 27, 2022
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Aug 27, 2022

@hamishmack hamishmack merged commit ca80ad0 into master Aug 27, 2022
@iohk-bors iohk-bors bot deleted the flake-local-nix-configuration branch August 27, 2022 05:24
hamishmack added a commit that referenced this pull request Aug 29, 2022
These were broken by #1579 because `nix flake lock` now asks for confirmation that it is ok to use the nix configuration in the flake.
hamishmack added a commit that referenced this pull request Aug 29, 2022
These were broken by #1579 because `nix flake lock` now asks for confirmation that it is ok to use the nix configuration in the flake.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants