From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id kMz8I0LALl9YAwAA0tVLHw (envelope-from ) for ; Sat, 08 Aug 2020 15:09:54 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id IPcJIELALl8uSAAAB5/wlQ (envelope-from ) for ; Sat, 08 Aug 2020 15:09:54 +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 E14AF9403A9 for ; Sat, 8 Aug 2020 15:09:53 +0000 (UTC) Received: from localhost ([::1]:36216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k4QTm-00058Z-TK for larch@yhetil.org; Sat, 08 Aug 2020 11:09:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56392) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k4QTH-00058Q-JA for help-guix@gnu.org; Sat, 08 Aug 2020 11:09:19 -0400 Received: from mout.web.de ([212.227.17.12]:56659) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k4QTD-0004vm-F7 for help-guix@gnu.org; Sat, 08 Aug 2020 11:09:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1596899351; bh=hvfB+h5hKdXGWcSbTvqxf/2IAMCiHqOmEvU8BpOojmc=; h=X-UI-Sender-Class:References:From:To:Cc:Subject:In-reply-to:Date; b=op5ANZ1qfn/j4jEvJSQIIafNmvs0MhpTF5lhryZtiVBliweHkH1lxvdJCuLGQ55ky qItRBF65HtyTWRtOmZOBKGKgD1sT9832A9GnXbeqZ+b0PqcNIsK8TkWBl2f1m8Byhl GB079SeWI0KvRJ9RHlD/zG7vyfgjefKIpTM2hygM= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from klingenberg-tablet ([95.222.214.177]) by smtp.web.de (mrweb103 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LZvcX-1kRi8p40eT-00lnXD; Sat, 08 Aug 2020 17:09:11 +0200 References: <87wo2ezg9z.fsf@web.de> <87k0ydqj6n.fsf@gmail.com> <877dubbwui.fsf@web.de> User-agent: mu4e 1.4.12; emacs 27.0.91 From: dario To: help-guix@gnu.org Subject: Re: Setting environment variables for nix service [SOLVED] In-reply-to: <877dubbwui.fsf@web.de> Date: Sat, 08 Aug 2020 17:09:07 +0200 Message-ID: <87y2mpuqcs.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:PSspKdd+9B/p3Cwb5zSy/R88r83LeCqp5amJuJjuM2VQPFgGWjF QdlpuQAeAI8OzLqI/vOixhMU5nZ2qAUvwR0/Pqp5ZAAHeM4GD2vgpK1konLPp5J6jXgblxT sGa/2mhV8X8FC4rAZf50uCt5AJsEGH21ogsSxJck40a07yXj88mQNz+JXPbs8UNjUumkFh6 u9pjlCeQ9E/Gt+QMPX5Xg== X-UI-Out-Filterresults: notjunk:1;V03:K0:+0WJG7Qd2Cc=:bD6gGnVbF6NnmJmnU4K7uS zpOeb4NZOulKMCNjbbH19z5MvcnVjM41PYcF3HBMVkSEMy6xl3f823HOcxSUCNFPl3WkRGZGO ek3SDvdYwJjlakISL8fug+FFvI7fwqKLkA8GEv84ka05UWWQDV6F0AVR2mayz0qVceGIJTFBr UwHaJNOVN4kDH/63VZ/smNtWwX/UTKemkfQmNn3WdowE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yTQqssmT/Lw== Received-SPF: pass client-ip=212.227.17.12; envelope-from=dario.klingenberg@web.de; helo=mout.web.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/08 11:09:12 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: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=web.de header.s=dbaedf251592 header.b=op5ANZ1q; 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: 1.49 X-TUID: C0B9MevQC9ag Hi, apparently, the issue was related to emacs (I am using doom emacs) setting environment variables after startup. Removing ~/.emacs.d/.local/env solved the issue, so this is not really=20 related to guix - sorry. Best Dario dario writes: > 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=20 > way 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=20 > by 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,=20 >>> ~/.zprofile, 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=20 >>> answer 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.