unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Jonathan Lane <jon@dorsal.tk>
Cc: help-guix@gnu.org
Subject: Re: adding environment variables to /etc/config.scm
Date: Tue, 03 Sep 2019 11:27:00 +0200	[thread overview]
Message-ID: <87a7blybkr.fsf@gnu.org> (raw)
In-Reply-To: <BWPSNJ6MHIFT.228L0UQZGVWRS@suika> (Jonathan Lane's message of "Mon, 02 Sep 2019 13:20:46 -0700")

Hello Jonathan,

"Jonathan Lane" <jon@dorsal.tk> skribis:

> I have a laptop with Intel graphics and I need to set the environment
> variable "COGL_ATLAS_DEFAULT_BLIT_MODE=framebuffer" to fix GPU 
> corruption issues as described here:
>
> https://wiki.archlinux.org/index.php/Intel_graphics#Troubleshooting
> https://bugs.freedesktop.org/show_bug.cgi?id=88584
>
> 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
‘operating-system’ declaration, and then run ‘reconfigure’ so that it’s
in effect.

To add environment variables to /etc/environment, you would “extend”
‘session-environment-service-type’, 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 ‘services’ field of your ‘operating-system’ declaration.

HTH!

Ludo’.

  reply	other threads:[~2019-09-03  9:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-02 20:20 adding environment variables to /etc/config.scm Jonathan Lane
2019-09-03  9:27 ` Ludovic Courtès [this message]
2019-09-04  2:04   ` Jonathan Lane

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a7blybkr.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=help-guix@gnu.org \
    --cc=jon@dorsal.tk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).