fix gnome-keyring
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, namespace, ... }:
|
||||
{ config, lib, pkgs, namespace, options, ... }:
|
||||
|
||||
let
|
||||
cfg = config.${namespace}.gnome-keyring;
|
||||
@@ -6,30 +6,18 @@ in {
|
||||
options.${namespace}.gnome-keyring = {
|
||||
enable = lib.mkEnableOption "Enable GNOME Keyring integration";
|
||||
};
|
||||
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.gnome-keyring = {
|
||||
enable = true;
|
||||
components = [ "secrets" "ssh" ];
|
||||
};
|
||||
# If using SDDM:
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
# PAM configuration for automatic keyring unlock
|
||||
security.pam.services.sddm.enableGnomeKeyring = true;
|
||||
# Also generally useful for other login methods
|
||||
security.pam.services.login.enableGnomeKeyring = true;
|
||||
# If using GDM:
|
||||
security.pam.services.gdm.enableGnomeKeyring = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
gnome.seahorse # Provides a GUI for managing the keyring
|
||||
];
|
||||
|
||||
environment.variables = {
|
||||
# Ensure GNOME Keyring is used for SSH keys
|
||||
SSH_AUTH_SOCK = "${pkgs.gnome-keyring}/run/gnome-keyring-ssh-socket";
|
||||
PASSWORD_STORE = "gnome-libsecret";
|
||||
};
|
||||
my-namespace.home.home.packages = with pkgs; [ # Ensure keyring integration in home environments
|
||||
gcr
|
||||
seahorse # GUI for managing the keyring
|
||||
gcr # Keyring integration
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user