30 lines
934 B
Nix
30 lines
934 B
Nix
{ config, lib, pkgs, namespace, options, ... }:
|
|
|
|
let
|
|
cfg = config.${namespace}.gnome-keyring;
|
|
in {
|
|
options.${namespace}.gnome-keyring = {
|
|
enable = lib.mkEnableOption "Enable GNOME Keyring integration";
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
services.gnome.gnome-keyring.enable = true;
|
|
|
|
# PAM configuration for automatic keyring unlock
|
|
security.pam.services.sddm.enableGnomeKeyring = true;
|
|
security.pam.services.login.enableGnomeKeyring = true;
|
|
security.pam.services.gdm.enableGnomeKeyring = true;
|
|
|
|
# Make KDE apps use GNOME Keyring as the Secret Service backend
|
|
environment.variables = {
|
|
# Set GNOME Keyring as the SSH agent
|
|
SSH_AUTH_SOCK = "$XDG_RUNTIME_DIR/keyring/ssh";
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
seahorse # GUI for managing the keyring
|
|
gcr # Keyring integration
|
|
libsecret # Secret Service API library for KDE apps
|
|
];
|
|
};
|
|
} |