Leo Prikler <leo.prikler@student.tugraz.at> writes:
Toggle quote (105 lines)
> Am Freitag, den 02.07.2021, 18:57 -0400 schrieb Joshua Branson:
>> 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:
>> > > > 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
>> > > try using match-lambda to define it. I'll post again when I have
>> > > free moment. When i get it working, I'll send a patch to the
>> > > via guix-patches and CC you. Is that ok? Or would you rather
>> > > documentation be in the cookbook?
>> > Did I make a mistake or does it do the job only in a somewhat
>> > way? I'm perfectly fine with the latter as I'm not the one using
>> I've got some code now that works!
>> (define (auto-login-to-tty tty user config)
>> (if (string=? tty (mingetty-configuration-tty config))
>> (mingetty-configuration
> Why do you need to inherit the config, when it doesn't change? Seems
> like a pointless allocation to me.
>> (mingetty-configuration
>> ;; allegedly %desktop-services now contains network-manager-
>> applet...? Can I remove that?
> Not with modify-services, but there's some filter example in the manual
>> (define %my-desktop-services
>> (modify-services %desktop-services ;;end of remove services
>> (mingetty-service-type config =>
>> (auto-login-to-tty "3" "joshua" config))))
>> > 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
>> ===================================
>> 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:
>> ;; My very own list of services.
>> (modify-services %base-services
>> (guix-service-type config =>
>> ;; Fetch substitutes from example.org.
>> (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
>> ;; Automatially log in as "guest".
>> (auto-login "guest")))))
>> (services %my-services))
>> How about I delete that section in the manual about automatic login
>> instead add this to the cookbook?
> No. Read on, the manual clearly states that this affects *all* TTYs.
> Presumably the guest user only has access to su and logout, maybe guix,
> but in any case they ought not to have access to anyone's $HOME, not
> The thing we've coded up here is a more involved process to solve a
> particular problem rather than a general demo of what services can do
> and thus belongs to the cookbook.
Joshua Branson (joshuaBPMan in #guix)
"You can have whatever you want, as long as you help
enough other people get what they want." - Zig Ziglar