-
Notifications
You must be signed in to change notification settings - Fork 0
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
Switching NixOS config does not apply home-manager together #680
Comments
https://discourse.nixos.org/t/home-manager-no-home-nix-and-do-not-have-home-manager-command/31156/5 But, my local behavior looks like the build is done, but not refresh the symlinks... |
Ah, I have faced similar issue again. Then looked same command in both /home/kachick/.nix-profile and /etc/profiles/per-user/kachick Since uninstalling home-manager with 💭 I would keep |
Same as in algae and it blocked by existing files [kachick@algae:~/repos/github.com/kachick/dotfiles]$ sudo nixos-rebuild switch --flake '.#algae' --show-trace
warning: Git tree '/home/kachick/repos/github.com/kachick/dotfiles' is dirty
building the system configuration...
warning: Git tree '/home/kachick/repos/github.com/kachick/dotfiles' is dirty
activating the configuration...
setting up /etc...
reloading user units for kachick...
restarting sysinit-reactivation.target
warning: the following units failed: home-manager-kachick.service
× home-manager-kachick.service - Home Manager environment for kachick
Loaded: loaded (/etc/systemd/system/home-manager-kachick.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Tue 2024-09-17 14:10:08 JST; 83ms ago
Process: 13082 ExecStart=/nix/store/18kq72xw0nnmzqaj40x9p0j76ymbzb7k-hm-setup-env /nix/store/kc5ybrcbz7qkmvmi6i9695j4ycjb4ady-home-manager-generation (code=exited, status=1/FAILURE)
Main PID: 13082 (code=exited, status=1/FAILURE)
IP: 0B in, 0B out
CPU: 105ms
9月 17 14:10:08 algae hm-activate-kachick[13173]: Please do one of the following:
9月 17 14:10:08 algae hm-activate-kachick[13173]: - Move or remove the above files and try again.
9月 17 14:10:08 algae hm-activate-kachick[13173]: - In standalone mode, use 'home-manager switch -b backup' to back up
9月 17 14:10:08 algae hm-activate-kachick[13173]: files automatically.
9月 17 14:10:08 algae hm-activate-kachick[13173]: - When used as a NixOS or nix-darwin module, set
9月 17 14:10:08 algae hm-activate-kachick[13173]: 'home-manager.backupFileExtension'
9月 17 14:10:08 algae hm-activate-kachick[13173]: to, for example, 'backup' and rebuild.
9月 17 14:10:08 algae systemd[1]: home-manager-kachick.service: Main process exited, code=exited, status=1/FAILURE
9月 17 14:10:08 algae systemd[1]: home-manager-kachick.service: Failed with result 'exit-code'.
9月 17 14:10:08 algae systemd[1]: Failed to start Home Manager environment for kachick.
warning: error(s) occurred while switching to the new configuration
[kachick@algae:~/repos/github.com/kachick/dotfiles]$ systemctl status "home-manager-$USER.service"
× home-manager-kachick.service - Home Manager environment for kachick
Loaded: loaded (/etc/systemd/system/home-manager-kachick.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Tue 2024-09-17 14:10:08 JST; 12s ago
Process: 13082 ExecStart=/nix/store/18kq72xw0nnmzqaj40x9p0j76ymbzb7k-hm-setup-env /nix/store/kc5ybrcbz7qkmvmi6i9695j4ycjb4ady-home-manager-generation>
Main PID: 13082 (code=exited, status=1/FAILURE)
IP: 0B in, 0B out
CPU: 105ms
9月 17 14:10:08 algae hm-activate-kachick[13173]: Please do one of the following:
9月 17 14:10:08 algae hm-activate-kachick[13173]: - Move or remove the above files and try again.
9月 17 14:10:08 algae hm-activate-kachick[13173]: - In standalone mode, use 'home-manager switch -b backup' to back up
9月 17 14:10:08 algae hm-activate-kachick[13173]: files automatically.
9月 17 14:10:08 algae hm-activate-kachick[13173]: - When used as a NixOS or nix-darwin module, set
9月 17 14:10:08 algae hm-activate-kachick[13173]: 'home-manager.backupFileExtension'
9月 17 14:10:08 algae hm-activate-kachick[13173]: to, for example, 'backup' and rebuild.
9月 17 14:10:08 algae systemd[1]: home-manager-kachick.service: Main process exited, code=exited, status=1/FAILURE
9月 17 14:10:08 algae systemd[1]: home-manager-kachick.service: Failed with result 'exit-code'.
9月 17 14:10:08 algae systemd[1]: Failed to start Home Manager environment for kachick.
[kachick@algae:~/repos/github.com/kachick/dotfiles]$ journalctl --unit home-manager-kachick.service
9月 17 14:09:05 algae systemd[1]: home-manager-kachick.service: Failed with result 'exit-code'.
9月 17 14:09:05 algae systemd[1]: Failed to start Home Manager environment for kachick.
9月 17 14:10:08 algae systemd[1]: Starting Home Manager environment for kachick...
9月 17 14:10:08 algae hm-activate-kachick[13082]: Home Managerの有効化を開始しました
9月 17 14:10:08 algae hm-activate-kachick[13082]: checkFilesChanged を有効化しています
9月 17 14:10:08 algae hm-activate-kachick[13082]: checkLinkTargets を有効化しています
9月 17 14:10:08 algae hm-activate-kachick[13173]: Existing file '/home/kachick/.mozilla/firefox/profiles.ini' is in the way of '/nix/store/gz9ah4irysrxfwxcp7l344v9i0kf4adv-home-manager-files/.mozilla/firefox/profiles.ini'
9月 17 14:10:08 algae hm-activate-kachick[13173]: Existing file '/home/kachick/.config/fcitx5/profile' is in the way of '/nix/store/gz9ah4irysrxfwxcp7l344v9i0kf4adv-home-manager-files/.config/fcitx5/profile', will be skipped since they are the same
9月 17 14:10:08 algae hm-activate-kachick[13173]: Existing file '/home/kachick/.config/zed/settings.json' is in the way of '/nix/store/gz9ah4irysrxfwxcp7l344v9i0kf4adv-home-manager-files/.config/zed/settings.json'
9月 17 14:10:08 algae hm-activate-kachick[13173]: Existing file '/home/kachick/.config/user-dirs.dirs' is in the way of '/nix/store/gz9ah4irysrxfwxcp7l344v9i0kf4adv-home-manager-files/.config/user-dirs.dirs'
9月 17 14:10:08 algae hm-activate-kachick[13173]: Please do one of the following:
9月 17 14:10:08 algae hm-activate-kachick[13173]: - Move or remove the above files and try again.
9月 17 14:10:08 algae hm-activate-kachick[13173]: - In standalone mode, use 'home-manager switch -b backup' to back up
9月 17 14:10:08 algae hm-activate-kachick[13173]: files automatically.
9月 17 14:10:08 algae hm-activate-kachick[13173]: - When used as a NixOS or nix-darwin module, set
9月 17 14:10:08 algae hm-activate-kachick[13173]: 'home-manager.backupFileExtension'
9月 17 14:10:08 algae hm-activate-kachick[13173]: to, for example, 'backup' and rebuild.
9月 17 14:10:08 algae systemd[1]: home-manager-kachick.service: Main process exited, code=exited, status=1/FAILURE
9月 17 14:10:08 algae systemd[1]: home-manager-kachick.service: Failed with result 'exit-code'.
9月 17 14:10:08 algae systemd[1]: Failed to start Home Manager environment for kachick.
~
[kachick@algae:~/repos/github.com/kachick/dotfiles]$ rm '/home/kachick/.mozilla/firefox/profiles.ini'
[kachick@algae:~/repos/github.com/kachick/dotfiles]$ rm '/home/kachick/.config/fcitx5/profile'
[kachick@algae:~/repos/github.com/kachick/dotfiles]$ rm '/home/kachick/.config/zed/settings.json'
[kachick@algae:~/repos/github.com/kachick/dotfiles]$ rm '/home/kachick/.config/user-dirs.dirs'
[kachick@algae:~/repos/github.com/kachick/dotfiles]$ sudo nixos-rebuild switch --flake '.#algae' --show-trace
warning: Git tree '/home/kachick/repos/github.com/kachick/dotfiles' is dirty
building the system configuration...
warning: Git tree '/home/kachick/repos/github.com/kachick/dotfiles' is dirty
activating the configuration...
setting up /etc...
reloading user units for kachick...
restarting sysinit-reactivation.target |
Now packages will be updated in nixos-rebuild, but files are not. Might be related to nix-community/home-manager#5519 |
I don't know why it generates only when first execution... 🤔 > nix run home-manager/release-24.05 -- generations
2024-09-17 16:21 : id 1 -> /nix/store/a56h6xklsjg0cd0qyxw4vbj3g1wy77cv-home-manager-generation |
> nix run home-manager/release-24.05 -- uninstall
❯ nix run home-manager/release-24.05 -- generations
ls: cannot access 'home-manager-*-link': No such file or directory
❯ sudo nixos-rebuild switch --flake .#algae
building the system configuration...
activating the configuration...
setting up /etc...
reloading user units for kachick...
restarting sysinit-reactivation.target
restarting the following units: home-manager-kachick.service
> nix run home-manager/release-24.05 -- generations
2024-09-17 18:15 : id 1 -> /nix/store/rbsvdvcjlnpsf7020pzl3bcqkc0dld03-home-manager-generation So uninstall home-manager as standalone version and rebuild nixos at everytime is the only one of the solution... 🙄 |
My fcitx5/profile is always conflicting in NixOS nix-community/home-manager#3090 (comment) dotfiles/home-manager/common.nix Lines 169 to 174 in cb4802a
dotfiles/nixos/desktop/default.nix Lines 291 to 302 in cb4802a
|
Have you read https://ayats.org/blog/no-home-manager, seems like you might find it relevant. |
Thank you for sharing! This post sounds interesting... |
nix-community/home-manager#5495 much helps to check collisions than now, but it is not all for my case... If no collisions, |
🤷♂️
dotfiles/flake.nix
Lines 136 to 150 in ca54fdd
The text was updated successfully, but these errors were encountered: