Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions config/serena/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
{
home.file.".serena/serena_config.yml" = {
source = config.lib.file.mkOutOfStoreSymlink ./serena_config.yml;
force = true;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Using force = true is 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.yml that is a regular file (not a symlink), it will be overwritten. Since the serena_config.yml file contains a projects list 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 = true is used and what its implications are.

    # WARNING: This overwrites any existing file, which can lead to data loss
    # of local modifications (e.g., the application-managed 'projects' list).
    force = true;

};
}
Loading