-
Notifications
You must be signed in to change notification settings - Fork 154
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
Symlinks not getting cleaned when removed from the config with Home-Manager #574
Comments
I'm trying this out for the first time today as well. I noticed that even when removing sops-nix completely from my flake and rebuilding my system that I still have a |
For the record, the issue @AdrienCos describes above is not a home-manager specific issue. It's just a bug with sops-nix. Here's where these symlinks outside of sops-nix/pkgs/sops-install-secrets/main.go Line 224 in c5ae1e2
symlinkSecrets to also delete now-unnecessary symlinks, which with the current architecture of sops-nix, I believe is impossible to do (short of scanning the entire filesystem for symlinks to files in /run/secrets/ ).
To fix this, I'd suggest that sops-nix maintain a list of "external symlinks" into
For the record, this setting is about garbage collection of the various "secret generation folders" (
@robert-baldwin, this is a different issue, and I'm not sure it's a solvable one: sops-nix's only mechanism for cleaning things up is to add stuff to system activation. If you remove sops-nix entirely, there's no way it could possibly clean itself up. Perhaps this suggests we're missing some documentation about how to remove sops-nix. I'd suggest you file a separate issue for that, though. |
Hi ! Thanks a lot for this awesome project :)
Issue
I am currently setting up my secrets with
sops-nix
in my personal config, starting with Home-Manager, and using flakes, and I've ran into an issue when changing thesops.secrets.<secret>.path
value:.path
option from the secret but keep everything else the same, nothing changes on my system, the symlink is still there and points to the valid decrypted secretIs this expected behavior, or is there some config that I may have missed somewhere ? Or is it a bug ?
Configuration excerpt :
The section of my flake that defines my HM config:
The sops-nix config inside my
home.nix
:Misc. Ideas
I have noticed an option named
sops.keepGenerations
that should apparently be in charge of doing some cleanup of old generations.eval
-ing its value in my config returns me1
(as expected, because I do not set it anywhere, and it's the default value). However, the fact that my secrets remain in place and decrypted after multiple HM generations makes me think that there is a bug somewhere.Additional information:
The text was updated successfully, but these errors were encountered: