From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id KNQyEi4mLF9HRwAA0tVLHw (envelope-from ) for ; Thu, 06 Aug 2020 15:47:58 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id CGz7DS4mLF8yPQAA1q6Kng (envelope-from ) for ; Thu, 06 Aug 2020 15:47:58 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 450AF9403C9 for ; Thu, 6 Aug 2020 15:47:57 +0000 (UTC) Received: from localhost ([::1]:55072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k3i7X-0002p2-K7 for larch@yhetil.org; Thu, 06 Aug 2020 11:47:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56884) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3i6o-0002nk-9e for help-guix@gnu.org; Thu, 06 Aug 2020 11:47:10 -0400 Received: from mout.web.de ([212.227.17.11]:44423) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k3i6m-0006KR-E7 for help-guix@gnu.org; Thu, 06 Aug 2020 11:47:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1596728824; bh=fV4xgvyA5cqSPhL18I7obpA9iu8Q6+epK8+gHYek8wg=; h=X-UI-Sender-Class:References:From:To:Cc:Subject:In-reply-to:Date; b=rER2IRAN7iT4OSPnznKktFbwwqO0cF1u7pr0JBwPNY4g+4LIB3/j0+66+V8IuTT12 +b4ZBqHifotuoqH/f5Sg3XVsE26ywUG+KWXe4ZOtkBvYgiJ3SQaOX71UqjD/HABk2y z+GbwiESVr1s2YXdiyRFLYVM/Ki50CqYsyrGJW4I= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from klingenberg-tablet ([95.222.213.136]) by smtp.web.de (mrweb102 [213.165.67.124]) with ESMTPSA (Nemesis) id 0Ldn2d-1kV2Mm3qGB-00j5Ni; Thu, 06 Aug 2020 17:47:03 +0200 References: <87wo2ezg9z.fsf@web.de> <87k0ydqj6n.fsf@gmail.com> User-agent: mu4e 1.4.12; emacs 27.0.91 From: dario To: Oleg Pykhalov Subject: Re: Setting environment variables for nix service In-reply-to: <87k0ydqj6n.fsf@gmail.com> Date: Thu, 06 Aug 2020 17:47:01 +0200 Message-ID: <877dubbwui.fsf@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:nZZpMDm1GzlbJ4TdbthahxQFbedcjKEcJvCzL24QriGM8tVgsfZ 1xgOwcDB7J6nMdMzVMhfQGDA/JC4WajsctCzfb8Y1jTAYgkdwaO5HtnpSq9GY8F3QTz7W9i mJDJLIr5z5U2qhBStQJT7d/15JoIWYcB26UTZRwIVhaIDKdW8zDVX/qW5dxlR2Xc87it4lr SkZ6JoriaOgYFOqFmPu3A== X-UI-Out-Filterresults: notjunk:1;V03:K0:5kb04mzcldc=:qMk+rxdqlciPs0SRjdeafy F+LIeMxh5LUc3wQq7sb+LVrdIskDkZ0vuWaCZtBfNv1zQQMyNuDa5/8QGWr/YlOrLKTXmIDFo vqpI2b211IObpLUVhq9EFpDeu6oYhbaXAdapXtEq39Y0uy6s2e46+tvvz0qm1C+bF38eOEeyX P26oTdro7ecqhLW9XqSSZNIYV1+gX8jO1PlkJh/nIrd9Qrcr8lyX7n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-SPF: pass client-ip=212.227.17.11; envelope-from=dario.klingenberg@web.de; helo=mout.web.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/06 11:47:05 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-guix@gnu.org Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=web.de header.s=dbaedf251592 header.b=rER2IRAN; dmarc=none; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Spam-Score: 0.29 X-TUID: gvIbcixFIpHa Hi, thanks for your input! > Could you try =E2=80=98~/.bashrc=E2=80=99, please? In that case, emacs still doesn't recognize the new environment variables, but of course, any terminals I start withing exwm do.=20 Still, this doesn't really solve the problem. Anyway, I am currently=20 working around the issue by setting the variables manually in my init.el=20 using setenv, but I would still be interested in learning the proper way=20 to set environment variables in a gdm+exwm-setting. By the way, ~/.bash_profile does get read, and I can e.g.=20 autostart programs by putting the respective commands in ~/.bash_profile.=20 However, environment variables set in ~/.bash_profile are not recognized by=20 emacs. Regarding my second question, it seems that the nix service is=20 already setting some of the nix-specific environment variables, but=20 doesn't change general ones such as $PATH. So maybe the feature I=20 suggested is already implemented, but they took care not change $PATH by=20 default because of the reason you mentioned. Cheers, Dario Oleg Pykhalov writes: > Hi, > > dario writes: > >> Two >> questions: >> >> 1. What is the proper way to do this? I am using gdm and exwm,=20 >> and >> adding the line to any of ~/.profile, ~/.xprofile, ~/.zprofile,=20 >> or >> ~/.bash_profile does not seem to have any effect in exwm. > > Probably GDM doesn't read those files by design. > > Could you try =E2=80=98~/.bashrc=E2=80=99, please? > >> 2. Couldn't the nix service take care of this automatically?=20 >> I'd be >> happy to contribute a corresponding path once I have the answer=20 >> to my >> first question. > > Probably yes, and the patch is welcome! ;-) Just one=20 > consideration - I > think it should be optional, in case the automation will brake=20 > because > of Nix update or highly customized system. > > Regards, > Oleg.