"Manage Printers" in applications list while CUPS disabled

Hey All,
Recently, I decided to switch from the stable to the unstable branch on my flake to see if it will improve my overall experience with the system. While I needed to address some of the config changes, most of them were trivial.
However, this one is a bit tricky. In the application list I see a new item which is “Manage Printers”. If you click on it will lead to the http://localhost:631/ web page which is supposed to be an interface for CUPS service to manage printers, but of course, this page is not loading and throws ERR_CONNECTION_REFUSED. The thing is — print services are disabled globally via services.printing.enable = false; and there are no other references in my config(s) to printers. I thought it might come from Gnome, which I currently use, but if I switch to Hyprland config (which removes gnome completely) I still see it in wofi app menu. Where does this come from? I cannot track this down…

1 Like

(post deleted by author)

No clue either, but here’s a workaround

{
  environment.extraSetup = ''
    rm $out/share/applications/cups.desktop
  '';
}

is /run/current-system/sw/share/applications/cups.desktop even an extant file or is this some caching issue? If the file exists, what’s the output of realpath /run/current-system/sw/share/applications/cups.desktop?

It was /nix/store/w3clwb8c7c8vc7ls163p5pjspccgcrhj-cups-2.4.11/share/applications/cups.desktop before I applied the workaround

Does nix eval MYFLAKE#nixosConfigurations.$(hostname).options.environment.systemPackages.definitionsWithLocations mention cups at all? (Replacing MYFLAKE of course). And in which file if so?

(Or if you don’t use flakes, nixos-option environment.systemPackages.)

If it doesn’t mention cups, what’s the output of nix why-depends /run/current-system /nix/store/w3clwb8c7c8vc7ls163p5pjspccgcrhj-cups-2.4.11?

Nope. There’s absolutely no “cups” in the output.

/nix/store/kbqfsfhfvqbpk6g0cbn4vx9b43a6mzc4-nixos-system-absolute-gnome-25.05pre-git
└───/nix/store/5i7zrddg33l6vblsy9j3ww2my3g7vmys-system-path
    └───/nix/store/w3clwb8c7c8vc7ls163p5pjspccgcrhj-cups-2.4.11

I have absolutely no clue why system-path depends on cups :confused:

1 Like