-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
bug: sops-nix activation in home-manager #6536
Comments
Been meaning to look into it more, but it is inconsistent when it occurs for me. |
@khaneliman I was grateful to find your original issue. I had been trouble shooting on a different/incorrect path as I was not having this same issue on my regular NixOS systems and I'm still new enough to the nix ecosystem that I was not confident in firing off an issue report. For a short time I was sure it was nix-darwin related and at one point I completely uninstalled nix from the Mac and then reinstalled without nix-darwin using home-manager only. And, then I repeated all combinations of the uninstall/reinstall again but instead of nix from nixos.org I tried the nix distributed by determinate. Again, first with nix-darwin then home-manager only. As of now I'm back to nix from nixos.org with both nix-darwin and home-manager and the issue is consistent. Having to go back to managing keys/secrets/misc items manually very much drove home how important the sops-nix project has become in my day to day workflow. sops-nix really is super useful and I am so glad it exists. |
Whenever I get the conflict, I just home-manager/modules/launchd/default.nix Lines 94 to 130 in b71edac
|
Even after removing the file that is in the way no joy. First run: Starting Home Manager activation
Activating checkFilesChanged
Activating checkKittyTheme
Activating checkLaunchAgents
Existing file '/Users/gesker/Library/LaunchAgents/org.nix-community.home.sops-nix.plist' is in the way of '/nix/store/x96razajz78mkr4p223bdc91l9yny65y-home-manager-agents/org.nix-community.home.sops-nix.plist' then remove the blocking file: rm /Users/gesker/Library/LaunchAgents/org.nix-community.home.sops-nix.plist Second run: Starting Home Manager activation
Activating checkFilesChanged
Activating checkKittyTheme
Activating checkLaunchAgents
Activating checkLinkTargets
Activating writeBoundary
Creating new profile generation
Activating createGpgHomedir
Activating installPackages
Activating migrateGhAccounts
Activating linkGeneration
Cleaning up orphan links from /Users/gesker
Creating home file links in /Users/gesker
Activating onFilesChange
Activating setupLaunchAgents
Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors. Third run: Back to original error Activating home-manager configuration for gesker
Starting Home Manager activation
Activating checkFilesChanged
Activating checkKittyTheme
Activating checkLaunchAgents
Existing file '/Users/gesker/Library/LaunchAgents/org.nix-community.home.sops-nix.plist' is in the way of '/nix/store/x96razajz78mkr4p223bdc91l9yny65y-home-manager-agents/org.nix-community.home.sops-nix.plist' I did try with sudo just to see if there was a difference but encountered: sudo nix run nix-darwin -- switch --flake /etc/nix-darwin
warning: $HOME ('/Users/gesker') is not owned by you, falling back to the one defined in the 'passwd' file ('/var/root')
building the system configuration...
warning: $HOME ('/Users/gesker') is not owned by you, falling back to the one defined in the 'passwd' file ('/var/root')
warning: Git tree '/etc/nix-darwin' is dirty
warning: $HOME ('/Users/gesker') is not owned by you, falling back to the one defined in the 'passwd' file ('/var/root')
setting up Homebrew (/opt/homebrew)...
setting up Homebrew (/usr/local)...
user defaults...
setting up user launchd services...
Homebrew bundle...
Error: Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.
It is every time so stuck on macOS. |
I have been running into the same errors, but this is not just with sops-nix. It is with every single launchd service that I have configured, including ones that are in HM already like Atuin, so I'm not actually sure if this is related to sops-nix directly or if it's a launchd activation issue in general. It's pretty consistent for me though, I get this on every single activation and it makes nix-darwin borderline unusable for me unless I remove all of the offending launchd services from my config. home-manager/modules/launchd/default.nix Lines 134 to 210 in b71edac
Bootstrap failed: 5: Input/output error and Boot-out failed come from the setupLaunchAgents activation script when launchctl bootout or launchctl boostrap are ran.
|
Are you following the right branch?
Is there an existing issue for this?
Issue description
There appears to be a plist file conflict when trying to activate sops-nix on home-manager; nix-darwin module. This issue was was mentioned under a possibly related - or at least similar - issue #710 in the sops-nix repository.
It was recommended to the OP on that issue that the issue be reported directly to home-manager. Again, not 100% sure that this is the same issue. Also, I did not see the OP of that issue RE-report in this repository.
Upon issuing
nix run nix-darwin -- switch --flake /etc/nix-darwin
an error is returned shortly after reaching Home-Manager activation:I have tried completely uninstalling Nix and then reinstalling nix running home-manager only (without nix-darwin) and the same error is encountered.
Maintainer CC
Unsure which maintainer it would be appropriate to tag.
System information
The text was updated successfully, but these errors were encountered: