From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 02 18:58:01 2021 Received: (at 48974) by debbugs.gnu.org; 2 Jul 2021 22:58:01 +0000 Received: from localhost ([127.0.0.1]:37278 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lzS6e-0004Os-P5 for submit@debbugs.gnu.org; Fri, 02 Jul 2021 18:58:01 -0400 Received: from mx1.dismail.de ([78.46.223.134]:47567) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lzS6Z-0004Ob-Nb for 48974@debbugs.gnu.org; Fri, 02 Jul 2021 18:57:55 -0400 Received: from mx1.dismail.de (localhost [127.0.0.1]) by mx1.dismail.de (OpenSMTPD) with ESMTP id fec2c43f; Sat, 3 Jul 2021 00:57:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=dismail.de; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=20190914; bh=1My1Os96 WKw5C9zcdsrFb8zbUfTHhfg4rbgOhNHsqlg=; b=vYiRIBa9gqC0q6NLzhEwBQSa 1Hw1QuSu2Qdiv7gJqI1QOlam5hqAOQoB8HXpZPdNJCfYadpNUZYPScn9yPiPruM3 iVrSVhJ0YFVFrfbmRdNAZo8g5vNYtGf0FzCRssWxAi5vvG5dKC7ZHfUfH8g0upCg 5fQTRxc4jlbJpa8cp+KynXZoEegREUtzNaqRgE8pHuDzfZDUE+MYJzDiPWC7vbKL /wa5Jzg2c+L8z0+7Ncg1eBlOGHD43lgr4QKDrk5Z0DIeftEsYkN8M0weKowD+lTT V+61EP4sMqW5Ab8I9kQjr4eiD/MUiLb/S05aJeTR7wtAK4ee3EN+ttxIJkruDA== Received: from smtp2.dismail.de ( [10.240.26.12]) by mx1.dismail.de (OpenSMTPD) with ESMTP id 491918b6; Sat, 3 Jul 2021 00:57:44 +0200 (CEST) Received: from smtp2.dismail.de (localhost [127.0.0.1]) by smtp2.dismail.de (OpenSMTPD) with ESMTP id c5945ab3; Sat, 3 Jul 2021 00:57:44 +0200 (CEST) Received: by dismail.de (OpenSMTPD) with ESMTPSA id 2b6479bc (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Sat, 3 Jul 2021 00:57:43 +0200 (CEST) From: Joshua Branson To: Leo Prikler Subject: Re: bug#48974: A possible shepherd bug (it's very minor) 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> Date: Fri, 02 Jul 2021 18:57:38 -0400 In-Reply-To: <595245e54b3199173b9e47992d770caa4f807312.camel@student.tugraz.at> (Leo Prikler's message of "Fri, 25 Jun 2021 20:28:14 +0200") Message-ID: <87y2ao728t.fsf@dismail.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -0.7 (/) 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: -1.0 (-) 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=3D? 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 =3D> (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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D System Services For example, suppose you want to modify =E2=80=98guix-daemon=E2=80=99 an= d Mingetty (the console log-in) in the =E2=80=98%base-services=E2=80=99 list (*note =E2=80=98%base-services=E2=80=99: Base Services.). To do that, you can wri= te the following in your operating system declaration: (define %my-services ;; My very own list of services. (modify-services %base-services (guix-service-type config =3D> (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 =3D> (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=20 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=3D? 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 =3D> (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