From mboxrd@z Thu Jan 1 00:00:00 1970 From: myglc2 Subject: Re: [V2 PATCH 1/1] services: Add agetty service. Date: Fri, 17 Feb 2017 20:23:51 -0500 Message-ID: <86k28os34o.fsf@gmail.com> References: <8b9a83141665a7a86aa3d3c9ba6363c1ba2e93cd.1487117562.git.leo@famulari.name> <20170215002417.GA19546@jasmine> <20170216070650.GA21674@jasmine> <86poig3bsv.fsf@gmail.com> <20170217225947.GA16812@jasmine> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cetkj-0003tt-Bs for guix-devel@gnu.org; Fri, 17 Feb 2017 20:23:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cetkg-0001sv-7D for guix-devel@gnu.org; Fri, 17 Feb 2017 20:23:57 -0500 Received: from mail-qt0-x242.google.com ([2607:f8b0:400d:c0d::242]:33667) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cetkg-0001sY-1G for guix-devel@gnu.org; Fri, 17 Feb 2017 20:23:54 -0500 Received: by mail-qt0-x242.google.com with SMTP id n13so8095765qtc.0 for ; Fri, 17 Feb 2017 17:23:53 -0800 (PST) In-Reply-To: <20170217225947.GA16812@jasmine> (Leo Famulari's message of "Fri, 17 Feb 2017 17:59:47 -0500") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Leo Famulari Cc: guix-devel@gnu.org On 02/17/2017 at 17:59 Leo Famulari writes: > On Fri, Feb 17, 2017 at 01:35:44PM -0500, myglc2 wrote: >> Hi Leo, >> >> I think that what you have is great. With this in my system config ... >> >> (agetty-service (agetty-configuration >> (tty "ttyS1") >> (baud-rate "115200"))) >> >> ... it works painlessly on a headless GuixSD server over IPMI. I think >> you can put a brief example in the doc, refer the user to the code and >> the agetty man page for more info, and declare victory. > > Awesome! > > Veering off-topic, I wonder what created that device node /dev/ttyS1? I > have 32 of them, but (gnu build linux-boot) appears to only create the > first one: > > https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/build/linux-boot.scm#n160 I found the serial line on my server by doing ... g1@g1 ~$ dmesg | grep tty [ 0.000000] console [tty0] enabled [ 2.192386] 00:07: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A ... but linux-boot.scm only specifies ttyS0 ... 160 ;; Serial line. 161 (mknod (scope "dev/ttyS0") 'char-special #o660 162 (device-number 4 64)) ... but gnu/packages/linux-libre-4.9-i686.conf has ... CONFIG_SND_SERIAL_U16550=m ... so maybe the kernel probes for and finds the UART. >> But let me digress a bit on this topic. What if, in situations like >> this, Guix provided an easy way to export the "native config" generated >> by Guix? >> >> Then we could tell the user ... >> >> 1) If you want to know exactly what we are doing, export the native >> config and read the native doc. >> >> 2) If you want features we don't support, export the native config, read >> the doc, modify it, and feed it into the "native config hatch." >> >> With this approach, we could implement and document only "key features" >> with a clear conscience. When we haven't implemented a feature the user >> needs they will be no worse off that they were before. In fact, they >> will usually be ahead, because Guix has taken care of the general >> requirements and provided a sound starting point for a native config. > > An interesting idea! I guess the implementation would vary based on > services that use a configuration file (like nginx) and those that are > configured on the command-line (like agetty). But I'm still finding my > way around services, in general, so I'm not sure. Agreed. Ideally there would be a strategy and reusable modules that supports either approach, or a mix. Then maybe this would lighten the effort required for each service and help regularize these interfaces.