unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Sergiu Ivanov <sivanov@colimite.fr>
To: Gottfried <gottfried@posteo.de>
Cc: "Dr. Arne Babenhauserheide" <arne_bab@web.de>, help-guix@gnu.org
Subject: Re: redshift
Date: Sun, 12 Mar 2023 12:07:41 +0100	[thread overview]
Message-ID: <87v8j641qa.fsf@colimite.fr> (raw)
In-Reply-To: <1f184e81-16cc-b490-80aa-9db675071361@posteo.de>

Hi Gottfried,

Gottfried <gottfried@posteo.de> [2023-03-11T17:47:19+0100]:
> I got a message from Julen Lepiller that reshift is a guix-home-service-type
> so I can’t use it in guix system.
>
> Have you got guix home and redshift there in your config.scm?
>
> I don’t have guix home,
> so can I use redshift?

guix home is a tool for managing your home configuration (the list of
user packages and parts of their configuration) in the same way as you
manage your system configuration [0].  In particular, this is how
I update my user packages with guix home:

guix home reconfigure ~/.config/guix/home.scm

You don't have to use it, but some people (e.g., me) like this approach.

To add Redshift to my home services, I add the following lines to
home.scm [1]:

(define redshift-service
  (service home-redshift-service-type
           (home-redshift-configuration
            (location-provider 'manual)
            (latitude 111)
            (longitude 222))))

where I replace 111 by the latitude of my location and 222 by the
longitude of my location.  This code defines the Redshift service and
binds it to the name `redshift-service`.  I then add this service to my
home services using the following code:

(home-environment
  (services (list redshift-service ...)) ...)

I also have other services and I define other parameters for
`home-environment`, which is why I put `...` in this example.  `...` is
not intended to be valid Guile in this context.

After guix home reconfigure ~/.config/guix/home.scm, I can see which
home services are running using the commmand

herd status

which shows something like:

Started:
 + redshift
 + root

and some other services.  Mind that I run herd status as my normal user,
without sudo.  Running sudo herd status will show you a much longer list
of system services.

To see the status of my home service redshift, I run

herd status redshift

which shows something like:

Status of redshift:
  It is started.
  Running value is 996.
  It is enabled.
  Provides (redshift).
  Requires ().
  Conflicts with ().
  Will be respawned.

You will note that Arne's manual approach is simpler to understand, so
you will probably want to go with it for now.  I am posting my
configuration just in case you are curious, and also for some other
people who may be looking for something similar.

-
Sergiu

[0] https://guix.gnu.org/manual/devel/en/html_node/Home-Configuration.html
[1] https://guix.gnu.org/manual/devel/en/html_node/Desktop-Home-Services.html


  parent reply	other threads:[~2023-03-12 12:02 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-11 16:47 redshift Gottfried
2023-03-11 17:25 ` redshift Dr. Arne Babenhauserheide
2023-03-12  8:03   ` redshift Gottfried
2023-03-12  8:08     ` redshift Dr. Arne Babenhauserheide
2023-03-12 11:07 ` Sergiu Ivanov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-03-11 11:14 redshift Gottfried
2022-11-11 14:47 RedShift Raghav Gururajan
2022-11-11 15:05 ` RedShift Felix Lechner via
2022-11-11 16:29   ` RedShift Raghav Gururajan
2022-11-11 16:48     ` RedShift Felix Lechner via
2022-11-12  4:26       ` RedShift Raghav Gururajan
2022-11-12  6:10         ` RedShift Felix Lechner via
2022-11-12 11:23           ` RedShift Raghav Gururajan
2022-11-18 16:51 ` RedShift Ludovic Courtès
2022-11-19  3:31   ` RedShift Raghav Gururajan
2022-12-02  8:43     ` RedShift Ludovic Courtès

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=87v8j641qa.fsf@colimite.fr \
    --to=sivanov@colimite.fr \
    --cc=arne_bab@web.de \
    --cc=gottfried@posteo.de \
    --cc=help-guix@gnu.org \
    /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).