Describe the bug
When plasma5 and gnome3 are enabled on my configuration.nix I get the following error:
# nixos-rebuild boot 2>&1 | tee /var/log/nixos-rebuild.log
building Nix...
building the system configuration...
trace: warning: mlocate does not support searching as user other than root
error: The option `programs.ssh.askPassword' has conflicting definitions, in `/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/services/x11/desktop-managers/plasma5.nix' and `/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/programs/seahorse.nix'.
(use '--show-trace' to show detailed location information)
Metadata
"x86_64-linux"Linux 5.4.3, NixOS, 20.03pre205624.8636580d6f4 (Markhor)yesyesnix-env (Nix) 2.3.1"nixos-20.03pre205710.352f030b715"/nix/var/nix/profiles/per-user/root/channels/nixosMaintainer information:
# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module: services/x11/desktop-managers/plasma5.nix programs/seahorse.nix
Right, I thought mkDefault would take care of that, but apparently not. Is the only way to fix things like these to hardcode a specific priority @worldofpeace?
Right, I thought
mkDefaultwould take care of that, but apparently not. Is the only way to fix things like these to hardcode a specific priority @worldofpeace?
In the instance of multiple declarations of programs.ssh.askPassword, I think it should just null itself out. There's no value that can be appropriately determined.
Edit: when I mean should, that's how it should behave when fixed.
Experienced this evaluation error when bumping to 20.03. Not yet knowing what this actually implies, I'm currently working around this by setting:
{ config, pkgs, ... }: {
services.xserver.desktopManager.plasma5.enable = true;
services.xserver.desktopManager.gnome3.enable = true;
programs.ssh.askPassword = pkgs.lib.mkForce "${pkgs.plasma5.ksshaskpass.out}/bin/ksshaskpass";
}
@knedlsepp This means, default, you can't evaluate using both gnome3 and plasma5?
@knedlsepp This means, default, you can't evaluate using both gnome3 and plasma5?
That's correct. I haven't tried the actual minimal example, but disabling either plasma5 or gnome3 would also make it evaluate, so I'm guessing it's the same issue as the OP describes.
So we could add different priorities to the gnome/plasma mkDefault, but that's pretty hacky. Ideally we'd have a better way to do per desktop config. That's doable by pushing things into shellInit and matching on XDG_DESKTOP_SESSION. That's hardly super pretty either, but it would solve the problem.
I bumped into the same issue.
Experienced this evaluation error when bumping to 20.03. Not yet knowing what this actually implies, I'm currently working around this by setting:
{ config, pkgs, ... }: { services.xserver.desktopManager.plasma5.enable = true; services.xserver.desktopManager.gnome3.enable = true; programs.ssh.askPassword = pkgs.lib.mkForce "${pkgs.plasma5.ksshaskpass.out}/bin/ksshaskpass"; }
this fixes the issue just after removing the gnome3 line.

Most helpful comment
Experienced this evaluation error when bumping to 20.03. Not yet knowing what this actually implies, I'm currently working around this by setting: