nix-community / home-manager

Manage a user environment using Nix [maintainer=@rycee]
https://nix-community.github.io/home-manager/
MIT License
6.56k stars 1.73k forks source link

bug: alacritty v0.13 and greater continues to create YAML file #5215

Open scallaway opened 4 months ago

scallaway commented 4 months ago

Are you following the right branch?

Is there an existing issue for this?

Issue description

Installing the unstable version of Alacritty through home-manager, I get version v0.13.2. As per https://github.com/nix-community/home-manager/pull/4817, the configuration file that's generated based on my settings is ~/.config/alacritty/alacritty.yml.

When running the version specified, a warning is placed at the bottom of the screen telling me to run alacritty migrate as the YAML file is deprecated.

I have had a look over the alacritty.nix file here, although I'm still very green to NixOS and the language itself, so I'm not able to offer any pointers there.

Maintainer CC

@r-vdp @ncfavier

System information

- system: `"x86_64-linux"`
 - host os: `Linux 6.1.82, NixOS, 23.11 (Tapir), 23.11.20240328.219951b`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(root): `"home-manager-23.11.tar.gz, nixos-23.11"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
r-vdp commented 4 months ago

The info you posted says that you run nixos 23.11 but AFAICT, nixpkgs 23.11 is still on alacritty 12, which uses yaml. Did you use an override or such to update alacritty on your system?

If you use the same versions of both HM and nixos, this should not happen, if I'm reading the code and versions correctly. But we could consider backporting the change that makes the module work for alacritty 13+.

@rycee should we backport #4817 to release-23.11?

scallaway commented 4 months ago

The info you posted says that you run nixos 23.11 but AFAICT, nixpkgs 23.11 is still on alacritty 12, which uses yaml. Did you use an override or such to update alacritty on your system?

Yeah so I'm selecting the alacritty package out of the unstable branch manually (specifying with the package property in programs.alacritty).

I'd love for these changes to be backported to the stable channel, but I'm concerned it's still not working on the unstable branch as-is.

r-vdp commented 4 months ago

I'm using alacritty on unstable without issues. The problem is that you're using the HM module from the release-23.11 branch of HM still, which doesn't know about the new toml format.

scallaway commented 4 months ago

Right that makes sense, I didn't realise that was also a requirement.

I'm guessing there isn't a way to selectively run the HM module on the unstable branch for alacritty alone?

scallaway commented 4 months ago

Fwiw, I've swapped my device over to using the unstable branch of HM and can confirm that fixes the issue as you outlined.

Would still love for this to be backported to stable though!

csumpasd commented 4 months ago

I'm having the same issue (on nix-darwin + home-manager), but would prefer not to use the unstable nixpkgs globally. Is there a way to selectively use the unstable home-manager for configuring alcritty? I didn't find anything about this online.

r-vdp commented 4 months ago

I'm having the same issue (on nix-darwin + home-manager), but would prefer not to use the unstable nixpkgs globally. Is there a way to selectively use the unstable home-manager for configuring alcritty? I didn't find anything about this online.

Not easily. You could either backport patches yourself, or write your own module instead of the upstream one.

But if you're using HM 23.11, you should be using nixpkgs 23.11, in which case you won't be having this issue to begin with. Mixing versions means that you're on your own :)

csumpasd commented 4 months ago

alright, thank you!

stale[bot] commented 1 month ago

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.