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

Add support for switching when no previous generation has existed #474

Conversation

kalbasit
Copy link
Collaborator

@kalbasit kalbasit commented Dec 2, 2018

This happens only when the user does not have a profile directory yet.

@kalbasit kalbasit changed the title home-manager: fix error attempting to expire generations [WIP] home-manager: fix errors when running switch when user has no profile yet Dec 2, 2018
@rycee
Copy link
Member

rycee commented Dec 11, 2018

Thanks for looking into this! I'll also try investigating a bit when possible.

@kalbasit
Copy link
Collaborator Author

I believe this PR is ready, I did not remove the WIP as I haven't had a chance to retry since. Feel free to remove the WIP and merge if it looks good to you.

@kalbasit kalbasit changed the title [WIP] home-manager: fix errors when running switch when user has no profile yet home-manager: fix errors when running switch when user has no profile yet Feb 15, 2019
@kalbasit
Copy link
Collaborator Author

kalbasit commented Feb 15, 2019

@rycee I finally had some time to move forward with Darwin build and I verified that this works now! This PR is now ready for your review.

EDIT: On second thought, I'm still finding issues with this so I'll work more on it and will let you know!

@kalbasit kalbasit changed the title home-manager: fix errors when running switch when user has no profile yet [WIP] home-manager: fix errors when running switch when user has no profile yet Feb 21, 2019
@kalbasit kalbasit closed this Feb 21, 2019
@kalbasit kalbasit force-pushed the home-manager_do-not-implode-if-no-previous-generations branch from a6ecae2 to 81dae2f Compare February 21, 2019 07:30
@kalbasit kalbasit reopened this Feb 21, 2019
@kalbasit kalbasit changed the title [WIP] home-manager: fix errors when running switch when user has no profile yet home-manager: fix errors when running switch when user has no profile yet Feb 22, 2019
@kalbasit kalbasit changed the title home-manager: fix errors when running switch when user has no profile yet Add support for switching when no previous generation has existed Feb 22, 2019
@rycee rycee closed this in 9ec9f00 May 16, 2020
@rycee
Copy link
Member

rycee commented May 16, 2020

Sorry for the very long delay. I finally had time to return to this problem and fund an alternative solution that I implemented instead. Hopefully it'll work OK for you.

NickHu pushed a commit to NickHu/home-manager that referenced this pull request May 19, 2020
Using the `nix-env` command is far more robust. It also has the
benefit that if the per-user `profiles` and `gcroots` directories do
not exist then they will be created with the correct permissions.

Because of the second point this commit also removes the `mkdir` step
of the installation instructions.

PR nix-community#1239
Closes nix-community#474, nix-community#948, nix-community#1091
rycee added a commit that referenced this pull request May 20, 2020
Using the `nix-env` command is far more robust. It also has the
benefit that if the per-user `profiles` and `gcroots` directories do
not exist then they will be created with the correct permissions.

Because of the second point this commit also removes the `mkdir` step
of the installation instructions.

PR #1239
Closes #474, #948, #1091

(cherry picked from commit 9ec9f00)
frobware pushed a commit to frobware/home-manager that referenced this pull request May 25, 2020
Using the `nix-env` command is far more robust. It also has the
benefit that if the per-user `profiles` and `gcroots` directories do
not exist then they will be created with the correct permissions.

Because of the second point this commit also removes the `mkdir` step
of the installation instructions.

PR nix-community#1239
Closes nix-community#474, nix-community#948, nix-community#1091
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.

None yet

2 participants