Gnome & KDE alongside - ssh.askPassowrd has conflicting values

I tried to install gnome with plasma, but am having some problems. This is my config:

  services = {
    xserver = {
      enable = true;
      desktopManager = {
        gnome.enable = true;
      };
    };
    desktopManager.plasma6.enable = true;
    displayManager = {
      defaultSession = "plasma";
      sddm = {
        enable = true;
        wayland.enable = true;
      };
    };

But when I try to rebuild my system I get the following error:

[root@dell-3:/etc/nixos]# nixos-rebuild switch 
building the system configuration...
error:
       … while calling the 'head' builtin
         at /nix/store/v0g0bxsd5gw6k0jz2855f8h7l1218925-source/lib/attrsets.nix:1574:11:
         1573|         || pred here (elemAt values 1) (head values) then
         1574|           head values
             |           ^
         1575|         else

       … while evaluating the attribute 'value'
         at /nix/store/v0g0bxsd5gw6k0jz2855f8h7l1218925-source/lib/modules.nix:846:9:
          845|     in warnDeprecation opt //
          846|       { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          847|         inherit (res.defsFinal') highestPrio;

       … while evaluating the option `system.build.toplevel':

       … while evaluating definitions from `/nix/store/v0g0bxsd5gw6k0jz2855f8h7l1218925-source/nixos/modules/system/activation/top-level.nix':

       … while evaluating the option `system.systemBuilderArgs':

       … while evaluating definitions from `/nix/store/v0g0bxsd5gw6k0jz2855f8h7l1218925-source/nixos/modules/system/activation/activatable-system.nix':

       … while evaluating the option `system.activationScripts.etc.text':

       … while evaluating definitions from `/nix/store/v0g0bxsd5gw6k0jz2855f8h7l1218925-source/nixos/modules/system/etc/etc-activation.nix':

       … while evaluating definitions from `/nix/store/v0g0bxsd5gw6k0jz2855f8h7l1218925-source/nixos/modules/system/etc/etc.nix':

       … while evaluating the option `environment.etc.profile.source':

       … while evaluating definitions from `/nix/store/v0g0bxsd5gw6k0jz2855f8h7l1218925-source/nixos/modules/system/etc/etc.nix':

       … while evaluating the option `environment.etc.profile.text':

       … while evaluating definitions from `/nix/store/v0g0bxsd5gw6k0jz2855f8h7l1218925-source/nixos/modules/programs/bash/bash.nix':

       … while evaluating the option `programs.bash.shellInit':

       … while evaluating definitions from `/nix/store/v0g0bxsd5gw6k0jz2855f8h7l1218925-source/nixos/modules/programs/bash/bash.nix':

       … while evaluating definitions from `/nix/store/v0g0bxsd5gw6k0jz2855f8h7l1218925-source/nixos/modules/config/shells-environment.nix':

       … while evaluating the option `environment.variables':

       … while evaluating definitions from `/nix/store/v0g0bxsd5gw6k0jz2855f8h7l1218925-source/nixos/modules/programs/ssh.nix':

       … while evaluating the option `programs.ssh.askPassword':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: The option `programs.ssh.askPassword' has conflicting definition values:
       - In `/nix/store/v0g0bxsd5gw6k0jz2855f8h7l1218925-source/nixos/modules/services/desktop-managers/plasma6.nix': "/nix/store/ci1ywi2a2dwgqz6wxr4hrv4paia07bxf-ksshaskpass-6.2.5/bin/ksshaskpass"
       - In `/nix/store/v0g0bxsd5gw6k0jz2855f8h7l1218925-source/nixos/modules/programs/seahorse.nix': "/nix/store/ixwr5nh8ya54mh4phjwzffab7bkmk6c4-seahorse-47.0.1/libexec/seahorse/ssh-askpass"
       Use `lib.mkForce value` or `lib.mkDefault value` to change the priority on any of these definitions.

[root@dell-3:/etc/nixos]# 

Can you guys help me understand this issue?

I’m sorry, I forgot to add it to help category…

try this:

programs.ssh.askPassword = pkgs.lib.mkForce "${pkgs.kdePackages.ksshaskpass.out}/bin/ksshaskpass";

This means two packages/options want to set the programs.ssh.askPassword option and Nix can’t decide which one to prioritize.

Thank you very much, I did know that I had to use mkForce function, but I would never come up with working solution!

1 Like