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})" + ''; }; }