From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aGlzCwLdEmFtHgEAgWs5BA (envelope-from ) for ; Tue, 10 Aug 2021 22:09:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 6KpMBwLdEmETcQAA1q6Kng (envelope-from ) for ; Tue, 10 Aug 2021 20:09:38 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C527C9C5A for ; Tue, 10 Aug 2021 22:09:37 +0200 (CEST) Received: from localhost ([::1]:53234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mDY48-0001Uq-QX for larch@yhetil.org; Tue, 10 Aug 2021 16:09:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mDY3c-0000rB-E6 for guix-patches@gnu.org; Tue, 10 Aug 2021 16:09:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49349) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mDY3c-0007Dc-7u for guix-patches@gnu.org; Tue, 10 Aug 2021 16:09:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mDY3c-0007CK-2y for guix-patches@gnu.org; Tue, 10 Aug 2021 16:09:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v2 7/7] doc: Add desktop seatd-service-type and greetd-service-type Resent-From: muradm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 10 Aug 2021 20:09:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49969 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49969@debbugs.gnu.org Received: via spool by 49969-submit@debbugs.gnu.org id=B49969.162862611827598 (code B ref 49969); Tue, 10 Aug 2021 20:09:04 +0000 Received: (at 49969) by debbugs.gnu.org; 10 Aug 2021 20:08:38 +0000 Received: from localhost ([127.0.0.1]:60888 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDY3B-0007Ax-Mh for submit@debbugs.gnu.org; Tue, 10 Aug 2021 16:08:38 -0400 Received: from mail-ej1-f54.google.com ([209.85.218.54]:46838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mDY2v-00079g-CM for 49969@debbugs.gnu.org; Tue, 10 Aug 2021 16:08:22 -0400 Received: by mail-ej1-f54.google.com with SMTP id gs8so37607329ejc.13 for <49969@debbugs.gnu.org>; Tue, 10 Aug 2021 13:08:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=muradm-net.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=UKAcPMRx55FH/riFmKry6ODo8gDXhvsR3WcroQQur7Y=; b=LmxdYY5IaXChowF2PMAB2ugRmwb/eJRMGHNENcIi7YGkuxs5xWxOLwfAqzf7nyknlc C4FeGOYyu3+vJLaG/aeiEhAUlipmpk+crqadQYZ7FBASBHlaXLBLpeewYVK4qI/oT7jz XuTz3XuX25kuP5YY0hWoNbfrqSYVIgQNnDJAglrP1n8vR6Hmo7AeNN63mlNQEZYGaNPU ib0/Xnje9FRYBkV1Zizeqfr53qb48nLfHhszWDSeimvqandJm5CwQPIJz/IP2c3Dn90d eSZ8Q7z1ocW942MgdN1Xs1x98pjEkdJGI0dhqDK1I1iOzDUIj/z4jz0dTXPi4WNsriHO f5Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UKAcPMRx55FH/riFmKry6ODo8gDXhvsR3WcroQQur7Y=; b=fgQIMpaNx0lPN7gPQmgKw275pkELMdNsMCpOtsB9iybs3mt7IberJdiv0feUyTsMiV EfADUMg5ArNqtaXBZtcP3vBbJe2vbBNir8q3wStDBHmJkjbbCa0tSGVQiRTuy052zSWw 2zf5cTSW18nCKcZGXbkMJdXJoyh5uEmPQd60bhjUpZREh+dFvalFqrjOV+7Rp8eBnMLE iJMdmc+S22VJ7WaBCiSIAArKYdm4IwKeLOPNq0gSEVmGdo6TaDRYyEQvWiq83pq2wloR aa5tJ3yxgAzgo/y89wzEOvHgunYJt2IjahoK6AiWUe5dC+lTidWjyj8vQz10q+eCMdu6 KM7w== X-Gm-Message-State: AOAM5339CiQeQxKaMO/QiKm+hlqc+HWy5V1YfUbzgGcVDEY/EMNBJ3n8 LZ/EIHQ8x+iBhDomwFkBO8aBWmlsH21a+g== X-Google-Smtp-Source: ABdhPJwgxxGWxR/tFtgnTOdUdGjCY9cIn1xDP4pd5Ule+z4A80/6ngCDvGGCEg5b8IFnifjgz7gSQw== X-Received: by 2002:a17:906:9c84:: with SMTP id fj4mr262708ejc.356.1628626095408; Tue, 10 Aug 2021 13:08:15 -0700 (PDT) Received: from localhost.localdomain ([31.142.54.188]) by smtp.gmail.com with ESMTPSA id qa34sm7247582ejc.120.2021.08.10.13.08.14 for <49969@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Aug 2021 13:08:14 -0700 (PDT) From: muradm Date: Tue, 10 Aug 2021 23:07:56 +0300 Message-Id: <20210810200756.9581-7-mail@muradm.net> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810193626.9186-1-mail@muradm.net> References: <20210810193626.9186-1-mail@muradm.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1628626178; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=UKAcPMRx55FH/riFmKry6ODo8gDXhvsR3WcroQQur7Y=; b=Ul2G0N8hkwVVlkB1VAKaFh+KHgQJoyPUl+leI8D7JOiCoJkcpqWPrGSbCUowng36t9gz51 Vl0SfSLsjXjUu+jw2sEM58ylfS1jvHaqaa7/lYkIL1I/FsedjlxzcLjbsbdQjpDpjJroe8 9/ilYQCPyoy0KUFz8/LnoQqlUbieI4vZA0abYrW4V2bQV3u/MBVpSS1KFVGzML+bssFsHj mBBco7CRlEGS+/qlktQu6mGburVCQ4m3LWX+n2C/iF4vsKH7+Ug9miP8gLq/bfEJOW7CiR uWS43Cdig6FWzb7XLyGY6d1ybIG+tJlE4v0h1TlQEufWi13JT5pVbdAfqrjjBg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628626178; a=rsa-sha256; cv=none; b=aqm+c93wiaZgtJk56tMYLukrHsmCa260BQsYBsJ/utw9330dH8aJez+XqjA1cOqHGCwXCK POQ8UOTqfZNJP1x8XF52Ua8gY7wXqpdKsilDgjLCw6bGzQbxuBIF3p2hfZ7y9a2x/UjSKs MD+flMVV1dio6fpsg3V+PueyLNw2Vu7LCucPTD4P1MKlUQvkfzX53v/T2QcibB0dMVTXaF bZPEbb8fktZEbn6xje90NZchDhqx0l8HnkebU9JWvFN5x82SOrksX2ZqATfIztNp36wgyX 5/a6Vs3qDZzXi82UB5rP458YdvWLA5UyBhCn5YistM/VeQ8geGC2TCr5CRVNQA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=muradm-net.20150623.gappssmtp.com header.s=20150623 header.b=LmxdYY5I; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 3.59 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=muradm-net.20150623.gappssmtp.com header.s=20150623 header.b=LmxdYY5I; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: C527C9C5A X-Spam-Score: 3.59 X-Migadu-Scanner: scn1.migadu.com X-TUID: ERkGU9qnWS/0 * doc/guix.texi (Desktop Services): Provide documentation for seatd-service-type and greetd-service-type including configuration and sample usage. --- doc/guix.texi | 183 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 183 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 4eb5324b51..586b879608 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -94,6 +94,7 @@ Copyright @copyright{} 2021 Xinglu Chen@* Copyright @copyright{} 2021 Raghav Gururajan@* Copyright @copyright{} 2021 Domagoj Stolfa@* Copyright @copyright{} 2021 Hui Lu@* +Copyright @copyright{} 2021 muradm@* Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -19694,6 +19695,188 @@ and ``passwd'' is with the value @code{passwd}. @end table @end deftp +@defvr {Scheme Variable} seatd-service-type +A minimal seat management daemon, and a universal seat management library. + +Seat management takes care of mediating access to shared devices (graphics, +input), without requiring the applications needing access to be root. + +In general should be used as replacement to @code{elogind-service-type}. + +@lisp +(append + (list + ;; make sure seatd is running + (service seatd-service-type) + + (service greetd-service-type + (greetd-configuration + (terminals + (list + ;; lets have terminals 1, 2 and 3 run default XDG terminal session + (greetd-terminal-configuration (terminal-vt "1")) + (greetd-terminal-configuration (terminal-vt "2")) + (greetd-terminal-configuration (terminal-vt "3")) + ;; and terminals 4, 5 and 6 plain bash terminal session + ;; although not so plain, just to illustrate flexibility + (greetd-terminal-configuration + (terminal-vt "4") + (default-session-command greetd-agreety-tty-session)) + (greetd-terminal-configuration + (terminal-vt "5") + (default-session-command greetd-agreety-tty-session)) + (greetd-terminal-configuration + (terminal-vt "6") + (default-session-command greetd-agreety-tty-session)))))) + + ;; normaly one would want %base-services + (modify-services %desktop-services + ;; seatd/greetd combination can replace these + (delete elogind-service-type) + (delete agetty-service-type) + (delete mingetty-service-type))) + +@end lisp + +@end defvr + +@deftp {Data Type} seatd-configuration +Configuration record for the seatd daemon service. + +@table @asis +@item @code{seatd} (default: @code{seatd}) +The seatd package to use. + +@item @code{user} (default: @samp{"root"}) +User to own the seatd socket. + +@item @code{group} (default: @samp{"users"}) +Group to own the seatd socket. + +@item @code{socket} (default: @samp{"/run/seatd/socket"}) +Where to create the seatd socket. + +@item @code{loglevel} (default: @samp{"error"}) +Log level to output logs. Possible values: @samp{"silent"}, @samp{"error"}, +@samp{"info"} and @samp{"debug"}. + +@end table +@end deftp + +@defvr {Scheme Variable} greetd-service-type +greetd is a minimal and flexible login manager daemon that makes no +assumptions about what you want to launch. + +If you can run it from your shell in a TTY, greetd can start it. If it +can be taught to speak a simple JSON-based IPC protocol, then it can +be a greeter. + +@code{} provides necessary infrastructure for +logging in users, including: + +@itemize @bullet +@item +@code{greetd} PAM service + +@item +Special variation of @code{pam-mount} to mount @code{XDG_RUNTIME_DIR} + +@end itemize + +@end defvr + +@deftp {Data Type} greetd-configuration +Configuration record for the greetd service. + +@table @asis +@item @code{motd} +A file-like object containing the ``message of the day''. + +@item @code{allow-empty-passwords?} (default: @code{#t}) +Allow empty passwords by default so that first-time users can log in when +the 'root' account has just been created. + +@item @code{terminals} (default: @code{'()}) +List of @code{} per terminal for which +@code{greetd} should be started. + +@end table +@end deftp + +@deftp {Data Type} greetd-terminal-configuration +Configuration record for per terminal greetd daemon service. + +@table @asis +@item @code{greetd} (default: @code{greetd}) +The greetd package to use. + +@item @code{config-file-name} +Configuration file name to use for greetd daemon. Generally, autogenerated +derivation based on @code{terminal-vt} value. + +@item @code{terminal-vt} (default: @samp{"7"}) +The VT to run on. Use of a specific VT with appropriate conflict avoidance +is recommended. + +@item @code{default-session-user} (default: @samp{"greeter"}) +The user to use for running the greeter. + +@item @code{default-session-command} (default: @code{greetd-agreety-tty-xdg-session}) +The command-line to run to start the default session. + +Possible values are: + +@itemize @bullet +@item +@code{greetd-agreety-tty-session} - bash terminal session + +@item +@code{greetd-agreety-tty-xdg-session} - bash terminal session with XDG environment + +@item +@code{greetd-agreety-session} - custom instance of terminal session +@end itemize + +@end table +@end deftp + +@deftp {Data Type} greetd-agreety-session +Configuration record for the agreety greetd greeter. + +@table @asis +@item @code{package} (default: @code{bash}) +The package of command. + +@item @code{command-bin} (default: @samp{"/bin/bash"}) +Path to binary relative to @code{package}. + +@item @code{command-args} (default: @code{'("-l")}) +Command arguments to pass to command. + +@item @code{extra-env} (default: @code{'()}) +Extra environment variables to set on login. + +@item @code{command-generator} +Function that receives instance of this configuration as an argument and +returns @code{program-file} that can be used with @code{agreety} greeter. + +Both @code{greetd-agreety-tty-session} and @code{greetd-agreety-tty-xdg-session} +uses @code{greetd-agreety-session} under the hood. + +@end table +@end deftp + +@defvr {Scheme Variable} greetd-agreety-tty-session +Provides instance of @code{greetd-agreety-session} which starts @samp{"bash -l"} +on login. +@end defvr + +@defvr {Scheme Variable} greetd-agreety-tty-xdg-session +Provides instance of @code{greetd-agreety-session} which starts @samp{"bash -l"} +on login. Additionally, will set @code{XDG_SESSION_TYPE} and +@code{XDG_RUNTIME_DIR} environment variables for session. +@end defvr + @node Sound Services @subsection Sound Services -- 2.32.0