Skip to content
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

feat: switch from rage to age #230

Merged
merged 7 commits into from
Dec 23, 2023
Merged

feat: switch from rage to age #230

merged 7 commits into from
Dec 23, 2023

Conversation

ryantm
Copy link
Owner

@ryantm ryantm commented Dec 20, 2023

Why

What changed

  • Switch from rage back to age (the reference implementation) in all the spots
  • Update the docs to show how to switch back to Rage

@ryantm ryantm added the feature New feature or request label Dec 20, 2023
@ryantm ryantm force-pushed the rtm-12-20-age branch 3 times, most recently from 191097d to 0ab68a5 Compare December 21, 2023 05:26
@n8henrie
Copy link
Collaborator

I looked at the most recent Darwin failure and it looks like LnL7/nix-darwin#149 -- I should be able to take a look later today (as I recall you don't have a Darwin system).

@n8henrie
Copy link
Collaborator

Sorry, I accidentally pushed to the wrong remote so reset to your last commit and force-pushed to revert.

@n8henrie
Copy link
Collaborator

I think the problem is that we're specifying this nix config in the cachix installer, then using the default nix config when installing nix-darwin (with sudo ... activate), and nix-darwin is noticing that it would be clobbering that config and refusing (actually is a little more sophisticated, it validates the context with known default configs from common nix installation methods: https://github.com/LnL7/nix-darwin/blob/4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d/modules/nix/default.nix#L666).

One possible fix would be to specify any necessary system-wide nix settings as part of the nix-darwin module and just rm /etc/nix/nix.conf prior to the activate command, which should then succeed at installing its own config.

Alternatively, I suppose we could:

  1. mv /etc/nix/nix.conf{,.bak}
  2. activate
  3. mv /etc/nix/nix.conf{.bak,}
  4. restart the nix daemon

@n8henrie
Copy link
Collaborator

LnL7/nix-darwin#149

@n8henrie
Copy link
Collaborator

@ryantm that seems to do the trick. Let me know what you think.

ryantm and others added 7 commits December 23, 2023 14:09
Why
===
* Someone said age works better with password protected keys,
requiring entering the password less often.
* We switched to rage from age in
07ce686
because it was limiting recipients to 20. This was fixed
FiloSottile/age#139

What changed
===
* Switch from rage back to age (the reference implementation) in all
the spots
* Update the docs to show how to switch back to Rage
* Skip keys that are empty files, which fixes the integration test.
nix-darwin is detecting `/etc/nix/nix.conf` from the
cachix/install-nix-action and refusing to overwrite it, failing the
nix-darwin activation and therefore the rest of CI.

This commit `mv`s the existing `nix.conf` to avoid the above, and then
adds support for new-style nix commands and flakes to the nix-darwin
configuration to allow their subsequent use in CI.

It also removes the nix config from the `cachix/install-nix-action`
step, which was duplicated effort since we are blowing it away with
nix-darwin anyway.

Relevant:

- LnL7/nix-darwin#149
@ryantm ryantm merged commit 457669d into main Dec 23, 2023
6 checks passed
@ryantm ryantm deleted the rtm-12-20-age branch December 23, 2023 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reconsider 20 recipients limit
2 participants