Skip to content
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: configuring firefox profiles and switching to a new generation fails due to an existing profiles.ini file #3302

Open
2 tasks done
mainrs opened this issue Oct 4, 2022 · 4 comments

Comments

@mainrs
Copy link
Contributor

mainrs commented Oct 4, 2022

Are you following the right branch?

  • My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

I use home-manager as a NixOS flake module.

I have a custom programs.firefox.profiles.<name> profile and configure some settings in it. However, creating a new generation with nixos-rebuild switch --flake .# --use-remote-sudo fails. It finds the old file and complains and does not re-load the configuration. I need to manually delete the file to get it to work.

$ nixos-rebuild switch --flake .# --use-remote-sudo
[...]
warning: the followung units failed: home-manager-<username>.service

x home-manager-<username>.service - Home Manager environment for <username>
    Loaded: loaded (/etc/systemd/system/home-manager-<username>.service; enabled; vendor preset: enabled)
    Active: failed (Result: exit-code) since ...; 13ms ago
    Process: 49666 ExecStart=/nix/store/l7v12mx37pcs6cvxwsz7yvalb6avx9ha-hm-setup-env /nix/store/cflj0hk3q62k8ya8a2mb2f1jrgyd2qg4-home-manager-generation (code=exited, status=1/FAILURE)
    Main PID: 49666 (code=exited, status=1/FAILURE)
    IP: 0B in, 0B out
    CPU: 74ms
    
    [...]
    hm-activate-<username>[49666]: Existing file '/home/<username>/.mozilla/firefox/profiles.ini' is in the way of /nix/store/..../profiles.ini

Maintainer CC

@rycee

System information

- system: `"x86_64-linux"`
- host os: `Linux 5.17.11 NixOS, 22.11 (Raccoon), 22.11.20220610.35c7173`
- multi-user? `yes`
- sandbox?: `yes`
- version: `nix-env (Nix) 2.9.1`
- channels (root): `"nixos-22.05"`
- nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@mainrs mainrs added bug triage Issues or feature request that have not been triaged yet labels Oct 4, 2022
@mainrs mainrs changed the title bug: configuring firefox profiles and switching to a new generation fails to to the existing profiles.ini file bug: configuring firefox profiles and switching to a new generation fails due to an existing profiles.ini file Oct 4, 2022
@stale
Copy link

stale bot commented Jan 3, 2023

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

  • If this is resolved, please consider closing it so that the maintainers know not to focus on this.
  • If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

  • If you are also experiencing this issue, please add details of your situation to help with the debugging process.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

@stale stale bot added the status: stale label Jan 3, 2023
@ncfavier
Copy link
Member

ncfavier commented Jan 3, 2023

When this happens, can you run diff ~/.mozilla/firefox/profiles.ini /nix/store/.../profiles.ini and look at the difference? Are you doing anything in firefox that would need to edit the profile file?

You can always do home.file.".mozilla/firefox/profiles.ini".force = true;

@ncfavier ncfavier removed triage Issues or feature request that have not been triaged yet status: stale labels Jan 3, 2023
@mainrs
Copy link
Contributor Author

mainrs commented Jan 4, 2023

I "fixed" this last time by simply deleting the mentioned file. All other generations correctly created the file afterwards. It might be that I changed some settings in Firefox and it wrote its own profiles.ini file for some reason.

@stale
Copy link

stale bot commented Apr 4, 2023

Thank you for your contribution! I marked this issue as stale due to inactivity. Please be considerate of people watching this issue and receiving notifications before commenting 'I have this issue too'. We welcome additional information that will help resolve this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

  • If this is resolved, please consider closing it so that the maintainers know not to focus on this.
  • If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

  • If you are also experiencing this issue, please add details of your situation to help with the debugging process.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

Don't be afraid to manually close an issue, even if it holds valuable information. Closed issues stay in the system for people to search, read, cross-reference, or even reopen – nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

@stale stale bot added the status: stale label Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants