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

health: Handle non-symlink dotfiles #366

Merged
merged 2 commits into from
Jan 6, 2025
Merged

health: Handle non-symlink dotfiles #366

merged 2 commits into from
Jan 6, 2025

Conversation

srid
Copy link
Member

@srid srid commented Jan 6, 2025

Previously these are silently ignored (#365). But with this PR, they now show up in "Unmanaged".

Also, panic on dotfile errors (unless required=false, in which case just warn) instead of silently ignoring them.


Test

❯ mkdir ~/tmp/ && echo echo > ~/tmp/.zshrc && ln -s $(readlink ~/.zshenv) ~/tmp/.zshenv && ls -la ~/tmp
drwxr-xr-x srid users 4.0 KB Mon Jan  6 14:03:40 2025  .
drwx------ srid users 4.0 KB Mon Jan  6 14:03:40 2025  ..
lrwxrwxrwx srid users  70 B  Mon Jan  6 14:03:40 2025  .zshenv ⇒ /nix/store/iqwi2ffg6w5sdaljc8g6fwrg13dp44ia-home-manager-files/.zshenv
.rw-r--r-- srid users   5 B  Mon Jan  6 14:03:40 2025 󱆃 .zshrc

image

So, this is a step towards #365 which still needs to be addressed -- as the above health check should ideally fail due to .zshrc not being managed by Nix.

srid added 2 commits January 6, 2025 14:01

Verified

This commit was signed with the committer’s verified signature.
derekpierre Derek Pierre
Previously these are silently ignored. But we they show up in
"Unmanaged".

Also, panic on dotfile errors instead of silently ignoring them.
@srid srid merged commit cee8c36 into main Jan 6, 2025
7 checks passed
@srid srid deleted the symlink-fix branch January 6, 2025 20:24
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

1 participant