From 4ff1acc318b725a534d82a4b57fbd5b478f5c317 Mon Sep 17 00:00:00 2001 From: Andreas Schaafsma Date: Tue, 23 Dec 2025 02:13:27 +0100 Subject: [PATCH] fix gnome-keyring --- modules/nixos/gnome-keyring/default.nix | 26 +++++-------------- .../drivebystation-nix/configuration.nix | 3 +-- .../drivebystation-nix/default.nix | 1 + 3 files changed, 9 insertions(+), 21 deletions(-) diff --git a/modules/nixos/gnome-keyring/default.nix b/modules/nixos/gnome-keyring/default.nix index f43c2b4..9e6e57d 100644 --- a/modules/nixos/gnome-keyring/default.nix +++ b/modules/nixos/gnome-keyring/default.nix @@ -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 ]; }; } \ No newline at end of file diff --git a/systems/x86_64-linux/drivebystation-nix/configuration.nix b/systems/x86_64-linux/drivebystation-nix/configuration.nix index 7d4a536..b1b9ecb 100644 --- a/systems/x86_64-linux/drivebystation-nix/configuration.nix +++ b/systems/x86_64-linux/drivebystation-nix/configuration.nix @@ -51,8 +51,7 @@ displayManager.defaultSession = "gnome"; desktopManager.plasma6.enable = true; - # Enable GNOME Keyring and KDE KWallet integration - my-namespace.gnome-keyring.enable = true; + xserver = { enable = true; # Enable the deprecated X11 teletype terminal connection system. diff --git a/systems/x86_64-linux/drivebystation-nix/default.nix b/systems/x86_64-linux/drivebystation-nix/default.nix index 903b7a5..57b2ca1 100644 --- a/systems/x86_64-linux/drivebystation-nix/default.nix +++ b/systems/x86_64-linux/drivebystation-nix/default.nix @@ -40,6 +40,7 @@ in system.stateVersion = "24.05"; nix.settings.experimental-features = [ "nix-command" "flakes" ]; # Define a user account. Don't forget to set a password with ‘passwd’. + my-namespace.gnome-keyring.enable = true; users.users.andreas = { isNormalUser = true; description = "Andreas Schaafsma";