From: Joshua Branson via Bug reports for GNU Guix <bug-guix@gnu.org>
To: Leo Prikler <leo.prikler@student.tugraz.at>
Cc: 48974@debbugs.gnu.org
Subject: bug#48974: A possible shepherd bug (it's very minor)
Date: Fri, 02 Jul 2021 18:57:38 -0400 [thread overview]
Message-ID: <87y2ao728t.fsf@dismail.de> (raw)
In-Reply-To: <595245e54b3199173b9e47992d770caa4f807312.camel@student.tugraz.at> (Leo Prikler's message of "Fri, 25 Jun 2021 20:28:14 +0200")
Leo Prikler <leo.prikler@student.tugraz.at> writes:
> Am Freitag, den 25.06.2021, 14:06 -0400 schrieb Joshua Branson:
>> Leo Prikler <leo.prikler@student.tugraz.at> writes:
>>
>> > Hi,
>> >
>> > Am Freitag, den 25.06.2021, 05:31 -0400 schrieb Joshua Branson:
>> > > Leo Prikler <leo.prikler@student.tugraz.at> writes:
>>
>> Thanks again! The current code doesn't quite work for me yet. I'll
>> try using match-lambda to define it. I'll post again when I have a
>> free moment. When i get it working, I'll send a patch to the manual
>> via guix-patches and CC you. Is that ok? Or would you rather that
>> documentation be in the cookbook?
> Did I make a mistake or does it do the job only in a somewhat inelegant
> way? I'm perfectly fine with the latter as I'm not the one using the
> code :P
I've got some code now that works!
#+BEGIN_SRC scheme
(define (auto-login-to-tty tty user config)
(if (string=? tty (mingetty-configuration-tty config))
(mingetty-configuration
(inherit config)
(auto-login user))
(mingetty-configuration
(inherit config))))
;; allegedly %desktop-services now contains network-manager-applet...? Can I remove that?
(define %my-desktop-services
(modify-services %desktop-services ;;end of remove services
(mingetty-service-type config =>
(auto-login-to-tty "3" "joshua" config))))
#+END_SRC
> I think the cookbook is a better destination for stuff like this.
I agree, but we should also probably fix the manual:
10.1 Using the Configuration System
===================================
System Services
For example, suppose you want to modify ‘guix-daemon’ and Mingetty
(the console log-in) in the ‘%base-services’ list (*note
‘%base-services’: Base Services.). To do that, you can write the
following in your operating system declaration:
(define %my-services
;; My very own list of services.
(modify-services %base-services
(guix-service-type config =>
(guix-configuration
(inherit config)
;; Fetch substitutes from example.org.
(substitute-urls
(list "https://example.org/guix"
"https://ci.guix.gnu.org"))))
;; it looks like the manual is telling you to set up
;; auto login on ALL ttys.
(mingetty-service-type config =>
(mingetty-configuration
(inherit config)
;; Automatially log in as "guest".
(auto-login "guest")))))
(operating-system
;; ...
(services %my-services))
How about I delete that section in the manual about automatic login and
instead add this to the cookbook?
Section Title: Setting up automatic login for one tty
The interested hacker, who wishes to set up automatic login to tty three
can use the following code snippet:
#+BEGIN_SRC scheme
(define (auto-login-to-tty tty user config)
(if (string=? tty (mingetty-configuration-tty config))
(mingetty-configuration
(inherit config)
(auto-login user))
(mingetty-configuration
(inherit config))))
(operating-system
(host-name "dobby")
...
(services
(cons*
(modify-services %base-services
(mingetty-service-type config =>
(auto-login-to-tty "3" "joshua" config))))
#+END_SRC
>
> Regards,
> Leo
>
--
Joshua Branson (joshuaBPMan in #guix)
Sent from Emacs and Gnus
https://gnucode.me
https://video.hardlimit.com/accounts/joshua_branson/video-channels
https://propernaming.org
"You can have whatever you want, as long as you help
enough other people get what they want." - Zig Ziglar
next prev parent reply other threads:[~2021-07-02 22:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-12 13:26 bug#48974: A possible shepherd bug (it's very minor) Joshua Branson via Bug reports for GNU Guix
2021-06-12 19:39 ` Leo Prikler
2021-06-12 20:09 ` jbranso--- via Bug reports for GNU Guix
2021-06-12 21:13 ` Leo Prikler
2021-06-25 9:31 ` Joshua Branson via Bug reports for GNU Guix
2021-06-25 9:56 ` Leo Prikler
2021-06-25 18:06 ` Joshua Branson via Bug reports for GNU Guix
2021-06-25 18:28 ` Leo Prikler
2021-07-02 22:57 ` Joshua Branson via Bug reports for GNU Guix [this message]
2021-07-03 6:41 ` Leo Prikler
2021-07-03 7:37 ` pelzflorian (Florian Pelz)
2021-07-05 23:59 ` Joshua Branson via Bug reports for GNU Guix
2021-06-12 23:34 ` jbranso--- via Bug reports for GNU Guix
2021-06-13 7:48 ` Leo Prikler
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=87y2ao728t.fsf@dismail.de \
--to=bug-guix@gnu.org \
--cc=48974@debbugs.gnu.org \
--cc=jbranso@dismail.de \
--cc=leo.prikler@student.tugraz.at \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
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).