From a0ab0b16feae278f7bfd2d5d9fd8d78d77b17f4d Mon Sep 17 00:00:00 2001 From: jD91mZM2 Date: Sat, 28 Dec 2019 17:14:03 +0100 Subject: [PATCH] keychain: add xsession integration --- modules/programs/keychain.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/programs/keychain.nix b/modules/programs/keychain.nix index 406f572ae..2231a7c2e 100644 --- a/modules/programs/keychain.nix +++ b/modules/programs/keychain.nix @@ -84,6 +84,15 @@ in Whether to enable Zsh integration. ''; }; + + enableXsessionIntegration = mkOption { + default = true; + type = types.bool; + visible = pkgs.stdenv.hostPlatform.isLinux; + description = '' + Whether to run keychain from your ~/.xsession. + ''; + }; }; config = mkIf cfg.enable { @@ -97,5 +106,8 @@ in programs.zsh.initExtra = mkIf cfg.enableZshIntegration '' eval "$(${shellCommand})" ''; + xsession.initExtra = mkIf cfg.enableXsessionIntegration '' + eval "$(${shellCommand})" + ''; }; }