Repository navigation
fix(serena): force symlink creation #586
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,5 +2,6 @@ | |
| { | ||
| home.file.".config/karabiner/karabiner.json" = { | ||
| source = ./karabiner.json; | ||
| force = true; | ||
| }; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -139,8 +139,10 @@ in | |
| home.packages = [ cfg.tailscaled.package ]; | ||
|
|
||
| # Declare directories and files for home-manager | ||
| home.file.".local/share/tailscale/tailscaled.state".source = | ||
| config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.local/state/tailscale/tailscaled.state"; | ||
| home.file.".local/share/tailscale/tailscaled.state" = { | ||
| source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/.local/state/tailscale/tailscaled.state"; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Prompt for AI agents |
||
| force = true; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P1: Forced symlink will delete existing tailscaled.state, risking loss of Tailscale node state Prompt for AI agents
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P2: Symlink forced to ~/.local/state but target directory is never created, leaving a broken state-file path Prompt for AI agents |
||
| }; | ||
|
Comment on lines
+142
to
+145
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: cat -n home-manager/modules/tailscale/default.nix | head -150 | tail -40Repository: shunkakinoki/dotfiles Length of output: 1601 🏁 Script executed: wc -l home-manager/modules/tailscale/default.nixRepository: shunkakinoki/dotfiles Length of output: 111 🏁 Script executed: cat -n home-manager/modules/tailscale/default.nixRepository: shunkakinoki/dotfiles Length of output: 11383 Add migration logic before forcing tailscaled.state symlink to preserve existing state. With 🤖 Prompt for AI Agents |
||
|
|
||
| # Tailscaled service | ||
| systemd.user.services.tailscaled = mkIf configEnabled { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
force = trueis a good way to ensure the declarative configuration is applied, but it carries the risk of data loss. If a user has a pre-existing~/.serena/serena_config.ymlthat is a regular file (not a symlink), it will be overwritten. Since theserena_config.ymlfile contains aprojectslist that is managed by the Serena application, overwriting it could cause the user to lose their list of registered projects.To mitigate this and to inform future developers, I suggest adding a comment explaining why
force = trueis used and what its implications are.