Attribute 'fcitx5-with-addons' missing

When updating NixOS, I get the following issue

       error: attribute 'fcitx5-with-addons' missing
       at /nix/store/6p26pcb63k9y859ph3gc9pnxvgxpc5qj-home-manager/home-manager/modules/i18n/input-method/fcitx5.nix:19:19:
           18|         type = lib.types.package;
           19|         default = pkgs.libsForQt5.fcitx5-with-addons;
             |                   ^
           20|         example = lib.literalExpression "pkgs.kdePackages.fcitx5-with-addons";

Which comes completely out of left field since I don’t use fcitx5 knowingly. I have not been able to assess where in my configuration it went wrong. I can only see that the version of home-manager used for the build is behind the master branch of home-manager.

  • Why is home-manager not using the latest commit on master?
  • Any ideas on how I can find the issue and fix it (outside of using --trace) ?

References:

My nix configs:

My build command:

NIXPKGS_ALLOW_UNFREE=1 nixos-rebuild switch --recreate-lock-file --flake --impure

I have followed help from Attribute : fcitx5-with-addons missing but no dice on fixing the issue.

Thank you :pray:

fcitx5: migrate to qt6Packages by mweinelt · Pull Request #7730 · nix-community/home-manager · GitHub already fixed this error.

Always commit your lockfile, then we can answer that.

I purposefully recreated the lock file in my build step, so it shouldn’t be relevant. However I was seeing that my home-manager is not up to date with the master branch. Could it be because it is following nixpkgs, or is it supposed to wait for a release on home-manager?

I pushed the lockfile, hope it can help :slight_smile:

Okay, the lockfile shows hm pointing to the newest commit, so the error doesn’t make sense. Remove the --impure and --recreate-lock-file and try again. (And allowing unfree should be in your config.)

The --impure flag is because of the way I use nix-hardware

hardware-configuration.nix

cannot look up '<nixos-hardware/tuxedo/aura/15/gen1>' in pure evaluation mode (use '--impure' to override)

and if I build with the --impure flag, but without --recreate-lock-file, then I get the same error again

If I need to remove the --impure flag, should I somehow reference ‘<nixos-hardware/tuxedo/aura/15/gen1>’ in the flake.nix?

Yes, see

Thank you for the guidance. I can see I have to convert everything to support flakes. I have skipped quite a few steps when i started to use flakes. It seems a hybrid system with flakes and channels is a treacherous path.

I will add a post after I’ve converted everything, and hopefully everything will be in order :smiley:

1 Like

You probably already know this, but just want to explicitly state that this isn’t about pointless pedantry, rather it will help us narrow down the issue a bit. If you use --impure, or run an essentially stateful command that blows out the lockfile, it’s relying on something on your system (channel states, environment variables, etc.) that we can’t help reproduce on our own system; however if you rely entirely on the existing lockfile for inputs, then we should be able to reproduce the error on our systems when trying to eval your config (or better, the error goes away on its own :slight_smile:).

That’s not to say we can’t try to help if you use channels, but involving channels and envvars and potentially even files outside of your repo definitely makes that harder.

2 Likes

I didn’t mean any hostility, I understand you are helping the best you can.

I appreciate the design of flakes. I would have to read up on why they aren’t the default.

1 Like

They’re not the default because they’re still experimental, design is unergonomic and even underperformant in many cases etc. Flakes are still seeing active development, but existing threads on discourse go into more details about why it’s been in limbo for 5 years.

Porting everything to using flakes resolved my problem.

Now I don’t need to use --impure flag to build my system anymore :smiley:

For info, these are the changes I made

Thank you @waffle8946 <3