From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: adding environment variables to /etc/config.scm Date: Tue, 03 Sep 2019 11:27:00 +0200 Message-ID: <87a7blybkr.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:34514) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1i555b-00055w-6O for help-guix@gnu.org; Tue, 03 Sep 2019 05:27:04 -0400 In-Reply-To: (Jonathan Lane's message of "Mon, 02 Sep 2019 13:20:46 -0700") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Jonathan Lane Cc: help-guix@gnu.org Hello Jonathan, "Jonathan Lane" skribis: > I have a laptop with Intel graphics and I need to set the environment > variable "COGL_ATLAS_DEFAULT_BLIT_MODE=3Dframebuffer" to fix GPU=20 > corruption issues as described here: > > https://wiki.archlinux.org/index.php/Intel_graphics#Troubleshooting > https://bugs.freedesktop.org/show_bug.cgi?id=3D88584 > > Unfortunately, it's supposed to go in /etc/environment, and that file > gets clobbered every time I reboot or run `guix system reconfigure`. Indeed, on Guix System one is not supposed to modify config files in place. Instead, you declare every aspect of your system config in your =E2=80=98operating-system=E2=80=99 declaration, and then run =E2=80=98recon= figure=E2=80=99 so that it=E2=80=99s in effect. To add environment variables to /etc/environment, you would =E2=80=9Cextend= =E2=80=9D =E2=80=98session-environment-service-type=E2=80=99, like so: (simple-service 'cogl-variable session-environment-service-type '(("COGL_ATLAS_DEFAULT_BLIT_MODE" . "framebuffer"))) The expression above provides a service that you can add to the list in the =E2=80=98services=E2=80=99 field of your =E2=80=98operating-system=E2= =80=99 declaration. HTH! Ludo=E2=80=99.