From debbugs-submit-bounces@debbugs.gnu.org Sat Jul 03 02:41:17 2021 Received: (at 48974) by debbugs.gnu.org; 3 Jul 2021 06:41:18 +0000 Received: from localhost ([127.0.0.1]:37825 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lzZL3-00013O-Ir for submit@debbugs.gnu.org; Sat, 03 Jul 2021 02:41:17 -0400 Received: from mailrelay.tugraz.at ([129.27.2.202]:12411) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lzZKy-00013C-V8 for 48974@debbugs.gnu.org; Sat, 03 Jul 2021 02:41:16 -0400 Received: from nijino.local (80-121-26-175.adsl.highway.telekom.at [80.121.26.175]) by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4GH2Qs20rJz3x8h; Sat, 3 Jul 2021 08:41:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at; s=mailrelay; t=1625294469; bh=86Fcm2Xg+xF8gszNHxKdqSioIMx0o7gkmhRhc+rBPgM=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=db5caAHxj5Abe2fQCPcmQP0Xkj3XPPyVKavzTnh3YPV7fo79DhG4qCePjGWaNwiZ8 cl3GzdlnYV1u4P0iudEel8iwjC5rihTYLkzEpv1FkXE18IiTgU7GNqaUwNwy6VP+BQ vRjNhWq3K20W108wdW+Qt8+OpUXU8oi3a2xPJfhE= Message-ID: Subject: Re: bug#48974: A possible shepherd bug (it's very minor) From: Leo Prikler To: Joshua Branson Date: Sat, 03 Jul 2021 08:41:08 +0200 In-Reply-To: <87y2ao728t.fsf@dismail.de> References: <9d5c5334eacfae92ace38329e55bc4a91929e206.camel@student.tugraz.at> <87wnqz43k0.fsf@dismail.de> <3192d62ef790c16fb2dfb894d9ccb160@dismail.de> <13bff20e418f1cec97cdda49ffed51544c5c9402.camel@student.tugraz.at> <87mtre5lzy.fsf@dismail.de> <6254e4d32697986bd61986e10399f341930c5c2e.camel@student.tugraz.at> <875yy1vmy7.fsf@dismail.de> <595245e54b3199173b9e47992d770caa4f807312.camel@student.tugraz.at> <87y2ao728t.fsf@dismail.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw X-Spam-Scanner: SpamAssassin 3.003001 X-Spam-Score-relay: -1.9 X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 48974 Cc: 48974@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Am Freitag, den 02.07.2021, 18:57 -0400 schrieb Joshua Branson: > Leo Prikler writes: > > > Am Freitag, den 25.06.2021, 14:06 -0400 schrieb Joshua Branson: > > > Leo Prikler writes: > > > > > > > Hi, > > > > > > > > Am Freitag, den 25.06.2021, 05:31 -0400 schrieb Joshua Branson: > > > > > Leo Prikler 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)) Why do you need to inherit the config, when it doesn't change? Seems like a pointless allocation to me. > (mingetty-configuration > (inherit config)))) > > ;; 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 as well. > (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? 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 even their own. 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. Regards, Leo