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

home-manager: move profile management #6242

Merged
merged 1 commit into from
Jan 3, 2025
Merged

Conversation

rycee
Copy link
Member

@rycee rycee commented Dec 29, 2024

Description

This commit separates profile management (setting profile and creating GC root) from file management (removing and adding managed files within the user's home directory).

This is a step towards deprecating profile management within the activation script, instead relying on the caller of the activation script managing the profile.

Checklist

  • Change is backwards compatible. Almost entirely, hypothetically somebody may rely on the profile switch happening in the link files activation script block but

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all or nix develop --ignore-environment .#all using Flakes.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

@rycee rycee self-assigned this Dec 29, 2024
@rycee rycee force-pushed the refactor-profile-update branch from 8a459ea to 1cab547 Compare December 29, 2024 23:37
@rycee
Copy link
Member Author

rycee commented Dec 29, 2024

@blaggacao Hi! Since you did the original support of "nix profile", would you mind trying out this PR? It is related to some simplifications I'm working on. In this case the home-manager profile update is moved and simplified. Note in the simplificated code I always use nix-env for the profile management.

In my tests this has worked well even when the user uses the modern "nix profile" style profiles. Still would be good with an independent test, though 🙂

@rycee rycee force-pushed the refactor-profile-update branch from 1cab547 to 9f6251f Compare January 2, 2025 00:06
@blaggacao
Copy link
Contributor

blaggacao commented Jan 2, 2025

Hi @rycee, I'm taking a break and keeping myself away from Nix setups these days, at least for some time.

Therefore, I hope my validation can be skipped.

I will maintain the intention to fix anything related to this should I stumble over it: I have a starting point, now, thank you for pinging me!

PS: The LoC net balance of this PR seems definitely worthwhile and promises greater long term stability.

PPS: Happy new year!

@rycee
Copy link
Member Author

rycee commented Jan 2, 2025

@blaggacao No worries, have a nice vacation away from Nix! 😀

@rycee rycee force-pushed the refactor-profile-update branch 2 times, most recently from e7479d7 to 72e9ac3 Compare January 3, 2025 08:14
This commit separates profile management (setting profile and creating
GC root) from file management (removing and adding managed files
within the user's home directory).

This is a step towards deprecating profile management within the
activation script, instead relying on the caller of the activation
script managing the profile.
@rycee rycee force-pushed the refactor-profile-update branch from 72e9ac3 to 1e68dc7 Compare January 3, 2025 10:23
@rycee rycee merged commit 1e68dc7 into master Jan 3, 2025
3 checks passed
@rycee rycee deleted the refactor-profile-update branch January 3, 2025 10:55
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