Hiya all, I have for the past few hours been trying to switch from gnome-keyring to KDE’s alternative of kwallet and I just cannot for the life of me figure out what is not working with my configuration. I’ve gone through all the forum posts and wikis I could find but for whatever reason whatever I do when I boot into my compositor there is no popup asking me to unlock the keyring, and the keyring is definitely still locked. Maybe I am misunderstanding the use of kwallet but still, I thought I would ask for help here. What is more weird is that even though I lib.mkForce services.gnome.gnome-keyring.enable to false, running busctl --user status org.freedesktop.secrets still shows gnome keyring.
The full relevant configuration file can be found here, and the non-relevant configuration parts have been cut out of the below summary of the file:
{
hostVars,
pkgs,
pkgsUnstable,
userVars,
...
}: {
# Enable fundamental Wayland utilities and portals
environment.systemPackages = with pkgs; [
kdePackages.kwallet # Provides helper service
kdePackages.kwallet-pam # Provides helper service
kdePackages.kwalletmanager # Provides KCMs and stuff
kdePackages.polkit-kde-agent-1
libsecret # For testing
];
xdg.portal = {
extraPortals = with pkgs; [
kdePackages.kwallet
];
/*
error: The option `xdg.portal.config.niri."org.freedesktop.impl.portal.Secret"' has conflicting definition values:
- In `...': "kwallet"
- In `...': "gnome-keyring"
Use `lib.mkForce value` or `lib.mkDefault value` to change the priority on any of these definitions.
*/
config.${userVars.programs.compositor}."org.freedesktop.impl.portal.Secret" = pkgs.lib.mkForce "kwallet";
};
security.pam.services = {
# If enabled, pam_wallet will attempt to automatically unlock the user’s default KDE wallet upon login.
# If the user has no wallet named “kdewallet”, or the login password does not match their wallet password,
# KDE will prompt separately after login.
${userVars.programs.login-manager}.kwallet = {
enable = true;
forceRun = true;
package = pkgs.kdePackages.kwallet-pam;
};
login.kwallet.enable = true;
};
systemd.user.services.pam-kwallet-init = {
description = "Unlock kwallet from pam credentials";
wantedBy = ["graphical-session.target"];
wants = ["graphical-session.target"];
after = ["graphical-session.target"];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.kdePackages.kwallet-pam}/libexec/pam_kwallet_init";
Slice = "background.slice";
Restart = "no";
};
};
# Start the agent as a graphical user service
systemd.user.services.polkit-kde-agent-1 = {
description = "polkit-kde-agent-1";
wantedBy = ["graphical-session.target"];
wants = ["graphical-session.target"];
after = ["graphical-session.target"];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.kdePackages.polkit-kde-agent-1}/libexec/polkit-kde-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
# Enable systemd user session support
services = {
dbus = {
enable = true;
packages = with pkgs; [
kdePackages.kwallet
];
};
# Session management
gnome.gnome-keyring.enable = pkgs.lib.mkForce false;
};
}
Thank you for any and all help
!
