-
-
Notifications
You must be signed in to change notification settings - Fork 233
ci: add Cachix cache #919
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
ci: add Cachix cache #919
Conversation
Fixes #880
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, if this works.
The total storage used to store all testbeds as of c919553 is 274 MiB, of the 5 GiB free allowance. (Cachix filters out any derivations which are already available on https://cache.nixos.org.) If we assume that every commit touches every derivation, this means we can cache just less than 20 commits of history. In reality not every commit will touch every derivation, so the actual amount cached will be much higher than that. In short, Cachix is good enough and there's no need to look at self hosting. |
Does this also use the cache as substitutor? We could probably see in the logs of future workflows. It might make sense to add the substitutor to the flake regardless, so local development can make use of the cache. |
Yes, the Cachix action adds the substitutor in
I personally find those prompts annoying - on NixOS you can't accept a substitutor defined in a flake without editing your configuration first, because the public key needs to be trusted in On the other hand, I can see how it could be useful in other setups as the intention is that you can just accept the substitutor in one "click". Unless you mean adding a module within Stylix which changes |
From my experience, a setup like this using #flake.nix
{
nixConfig = {
substituters = [ "stylix.cachix.org" ];
trusted-public-keys = [ "..." ];
};
} But I can see how it could be annoying to users that don't use it and have to reject it when promoted.
No, I don't think that the cache would be useful for configurations, because every possible style yields a different result. |
From my experience, a setup like this using #flake.nix
{
nixConfig = {
substituters = [ "stylix.cachix.org" ];
trusted-public-keys = [ "..." ];
};
} But I can see how it could be annoying to users that don't use it and have to reject it when prompted.
No, I don't think that the cache would be useful for configurations, because every possible style yields a different result. |
In my config, I just get: [danth@circinus:~]$ nix build github:nix-community/nixvim#docs
do you want to allow configuration setting 'allow-import-from-derivation' to be set to 'false' (y/N)? y
do you want to permanently mark this value as trusted (y/N)?
do you want to allow configuration setting 'extra-substituters' to be set to 'https://nix-community.cachix.org' (y/N)? y
do you want to permanently mark this value as trusted (y/N)?
do you want to allow configuration setting 'extra-trusted-public-keys' to be set to 'nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=' (y/N)? y
do you want to permanently mark this value as trusted (y/N)?
warning: ignoring untrusted substituter 'https://nix-community.cachix.org', you are not a trusted user.
Run `man nix.conf` for more information on the `substituters` configuration option.
warning: ignoring the client-specified setting 'trusted-public-keys', because it is a restricted setting and you are not a trusted user |
Sorry, should have mentioned that. You'll need to be a trusted user for that. # NixOS configuration
{
nix.settings.trusted-users = ["danth" "@wheel"];
} |
I agree that explicitly trusting certain entities is rather annoying and should be avoided, if possible. |
This will improve CI performance, and may also be used locally, although this is not officially documented at this time. I tested the required amount of space by building a `pkgs.linkFarm` containing all testbeds, then manually pushing this to an empty Cachix cache. The total space used was 274 MiB of the 5 GiB free allowance, so Cachix is good enough to cache at least 20 commits of history, assuming the worst case scenario of every commit changing every derivation we build. Fixes nix-community#880
This will improve CI performance, and may also be used locally, although this is not officially documented at this time. I tested the required amount of space by building a `pkgs.linkFarm` containing all testbeds, then manually pushing this to an empty Cachix cache. The total space used was 274 MiB of the 5 GiB free allowance, so Cachix is good enough to cache at least 20 commits of history, assuming the worst case scenario of every commit changing every derivation we build. Fixes nix-community#880
This will improve CI performance, and may also be used locally, although this is not officially documented at this time. I tested the required amount of space by building a `pkgs.linkFarm` containing all testbeds, then manually pushing this to an empty Cachix cache. The total space used was 274 MiB of the 5 GiB free allowance, so Cachix is good enough to cache at least 20 commits of history, assuming the worst case scenario of every commit changing every derivation we build. Fixes nix-community#880
I tested the required amount of space by building a
pkgs.linkFarm
containing all testbeds, then manually pushing this to an empty Cachix cache.The total storage used has not yet updated in the UI, and I'll add the exact measurement here when it does. However, I'm fairly sure that the used space is far less than what is available on the free plan.
Fixes #880