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

installer: improve existing rc backup nag #5524

Merged
merged 1 commit into from
Nov 10, 2021

Conversation

abathur
Copy link
Member

@abathur abathur commented Nov 9, 2021

While looking into #5521 I noticed that the installer instructions don't really connect the dots about what the user is expected to do.

This is a tentative rephrase, but I also realize that this kind of thing may well be informed by history--that we're intentionally leaving out steps so that the kinds of people confused by this will ask for help instead of screwing up their systems and trashing us on social. I think GC would've cautioned if this were the case.

Objections? @toonn @grahamc @domenkozar

for reference, should look something like:
I back up shell profile/rc scripts before I add Nix to them. 
I need to back up /etc/bashrc to /etc/bashrc.backup-before-nix,
but the latter already exists.

Here's how to clean up the old backup file:

1. Back up (copy) /etc/bashrc and /etc/bashrc.backup-before-nix to
   another location, just in case.

2. Ensure /etc/bashrc.backup-before-nix does not have anything
   Nix-related in it. If it does, something is probably quite
   wrong. Please open an issue or get in touch immediately.

3. Once you confirm /etc/bashrc is backed up and doesn't already
   mention Nix, replace it with /etc/bashrc.backup-before-nix.

@@ -387,19 +387,25 @@ EOF
fi

for profile_target in "${PROFILE_TARGETS[@]}"; do
# TODO: I think it would be good to accumulate a list of all
# of the copies so that people don't hit this 2 or 3x in
# a row for different files.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would, to be frank, like it to work as commented, and not as coded.

I didn't want to let that pass completely undocumented--but I'm chasing other white whales at the moment and do not have the emotional/intellectual energy to make this happen without an installer test suite that ensures the important bits stay nailed down.

Copy link
Member

@grahamc grahamc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some feedback with abathur in a PM on Matrix about point #3 and rewording it a bit, but this looks great to me.

@abathur abathur force-pushed the improve_existing_backup_profile_msg branch from 5f24ce9 to d223050 Compare November 9, 2021 02:54
@abathur
Copy link
Member Author

abathur commented Nov 9, 2021

I left some feedback with abathur in a PM on Matrix about point #3 and rewording it a bit, but this looks great to me.

I've force-pushed addressing feedback per 3 :)

@abathur abathur force-pushed the improve_existing_backup_profile_msg branch from d223050 to f7859ee Compare November 9, 2021 14:14
@edolstra edolstra merged commit 52a3b2e into NixOS:master Nov 10, 2021
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.

4 participants