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

etc: allow overwriting files with unknown hashes #836

Closed
wants to merge 1 commit into from

Conversation

Enzime
Copy link
Collaborator

@Enzime Enzime commented Dec 22, 2023

For users encountering #149

@emilazy
Copy link
Collaborator

emilazy commented Jun 15, 2024

Is this still desirable now that we have known hashes for /etc/shells and /etc/nix/nix.conf, by the far the most common occurrences of this? I’m especially wary of a configuration‐based approach, as opposed to something more one‐time like an environment variable, as I suspect people will opt in and then forget about it. Overall I lean towards handling this cleanly upstream whenever we can and letting users manually mv things out of the way for the cases we can’t deal with ourselves.

@Enzime
Copy link
Collaborator Author

Enzime commented Jun 15, 2024

I agree that making this an option that users can set and forget in their configuration is not ideal, I'm happy to close this PR for now

The main reason I created this commit in the first place was for my darwin test VM where /etc/nix/nix.conf would not have a fixed content and I just wanted to ignore that, I'll have to think more potentially about how I'll implement it

@Enzime Enzime closed this Jun 15, 2024
@Enzime Enzime deleted the add/force branch June 15, 2024 15:04
@emilazy
Copy link
Collaborator

emilazy commented Jun 15, 2024

A potential simple solution would be an environment variable containing filenames or hashes that are okay to overwrite. You could also just add rm /etc/nix/nix.conf to the activation scripts if you wanted to do something really hacky :)

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