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 6OEzGzNuHmHs9QAAgWs5BA (envelope-from ) for ; Thu, 19 Aug 2021 16:44:03 +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 CJn8FjNuHmHySwAA1q6Kng (envelope-from ) for ; Thu, 19 Aug 2021 14:44:03 +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 215BF1A213 for ; Thu, 19 Aug 2021 16:44:03 +0200 (CEST) Received: from localhost ([::1]:33578 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGjH0-0006bC-8o for larch@yhetil.org; Thu, 19 Aug 2021 10:44:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59274) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGjDB-0006gA-O5 for guix-patches@gnu.org; Thu, 19 Aug 2021 10:40:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49032) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mGjDB-0005wg-BB for guix-patches@gnu.org; Thu, 19 Aug 2021 10:40:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mGjDB-0000Lj-97 for guix-patches@gnu.org; Thu, 19 Aug 2021 10:40:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v4 10/10] 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: Thu, 19 Aug 2021 14:40:05 +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.16293839851249 (code B ref 49969); Thu, 19 Aug 2021 14:40:05 +0000 Received: (at 49969) by debbugs.gnu.org; 19 Aug 2021 14:39:45 +0000 Received: from localhost ([127.0.0.1]:60569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGjCq-0000K0-FS for submit@debbugs.gnu.org; Thu, 19 Aug 2021 10:39:44 -0400 Received: from mail-ej1-f47.google.com ([209.85.218.47]:37821) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGjCe-0000IT-F0 for 49969@debbugs.gnu.org; Thu, 19 Aug 2021 10:39:33 -0400 Received: by mail-ej1-f47.google.com with SMTP id h9so13443096ejs.4 for <49969@debbugs.gnu.org>; Thu, 19 Aug 2021 07:39:32 -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=X5B9Qd55nSCKA6XjB1MsLqDY4wPCKD2qims4BRcZ9xg=; b=ftevKKrfcyNnDSYcxwl1dQm7NNIfXS1Su4jy2OQmvayN0yayhgVXQq8l6+o8M+XM6E 3m/1PwhVV1C5gon70iap+Ln6bAYOtf/oci49Ejyzz31QGqYHmt+jLb54Zzrgn/C58iIu wCCA9Sfy/4X2LKatWSAnKNNJEJ5bMIl1U9V0O2VJrcX2sSIQsGwj/XF/s0QZPGwdvo32 DfzYrBAptar8EhH5TPcWc69EMRUmdkbFeObf6eIfzjH8gUFlaunne3Xgwag/KsHyUQyB 1hwJLsfl7+vr4M7fT56MsL8UiUCfzyFA7Gk3sjX/VRjYGnR3eOI3Aay8CZQJ7rW+PCMM ETBw== 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=X5B9Qd55nSCKA6XjB1MsLqDY4wPCKD2qims4BRcZ9xg=; b=W3kNcFf//JlUcKSich+Ye4+VH+wNwy1JIpJz5jyA197zadS0UepR5DoeFydoBDvhjB LA4E6ffYao7+ohq8GUAwBxjo9Grio7s3bkfc535q2m0kmANeHaKEX1IWfb0JdZEQ+4dZ vQIe2ApTfO/eI/z5YMhZIe8izwZZTOUYdRQx228cEmkMBvQrCnCArVQAe0gj0apuC/4t b48e9oUK0R8Ecn40G/XgYvNWvZ3WwJ4NSGTUWvOt1GEWnX0LIj67+zSFwrz9EDSx6pgN m3DwkhgR9U8ndcjskWlLob0huKg2tDg4yXVHIcvPiK9MkCI7E+/ZqmIgn9VHA4Cc4nOI aIHw== X-Gm-Message-State: AOAM530Gysw1y6JkuUpGoxxOUD7wPl3Ygyq8bkcDJKRjKNFpazS/vA4C wmhKD6xOqae+oK8fzFpmww8VRHwqr1Asdw== X-Google-Smtp-Source: ABdhPJxD737JbMFM1gmeAH3AThJt3a+T+MR+Kdje1Xm+xqq+ceQxZHhvpmzssWpK5oRx87fdfbly+A== X-Received: by 2002:a17:907:1c8d:: with SMTP id nb13mr16329365ejc.155.1629383966460; Thu, 19 Aug 2021 07:39:26 -0700 (PDT) Received: from localhost.localdomain ([188.58.13.35]) by smtp.gmail.com with ESMTPSA id b8sm1825954edv.96.2021.08.19.07.39.25 for <49969@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Aug 2021 07:39:26 -0700 (PDT) From: muradm Date: Thu, 19 Aug 2021 17:39:06 +0300 Message-Id: <20210819143906.6705-10-mail@muradm.net> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210819143133.6398-1-mail@muradm.net> References: <20210819143133.6398-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=1629384243; 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=X5B9Qd55nSCKA6XjB1MsLqDY4wPCKD2qims4BRcZ9xg=; b=hvlBGWjNjDDKHZ7WajM+sAX7fnEM8OScfmbe8KPRZ0rFWKgXO+7tnN15HCit1asV1GvxWP nvAw7NAS315+GBsntapZrZStBjWRVJeFrTuWbzNa8/xoDJMv3OoYU6h2zxkGpt61NPpAFw VtNj5zq/YgxnDhg8p+g2cGqwYZirh3Ye39N2tQAj/I1omfssrtLdyOmDfj/RbqyRGxDACR cPoxhbbB6Wh6qBuBGaToLtYC/uDeoXHPAAgHL1XSday8j0xm9J2xlKQvgwMJcISdemieJ0 wCGUc9JrcE3s0opky6AxJwDLafs7cyP1OpbecTr8R62cMOl23OPD5vBVq9qjSw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1629384243; a=rsa-sha256; cv=none; b=DANEEQC9Yxl6DaKWzZPr0/oYOCsCKXnae/J/xP9UbDHzwD/Mb32DAi2s3Y0NPipeXVrLw6 Kh5q99umdAXp4u37HGr1ryZiTc/9pC4rM1QuaJu3FyNA7SFD8SIk0KwYspSlA4fX6l/7fQ tSPQRUq8E6L3i4xuh3UrHIFmRHYCY1fNg3vrNeKtjNXL5Pn3KX08QDueC7zHyNCE3/ucUH 0yA6/yYQo4/ak7LG8Q7bQ12KztulqfblytYAP4xK/8ffo24q1ijx2S3+VS1vCQdTQC9OZR gG1K+b0iLsrwwA/Xh4RfDWz7i5f5oudOV47YqVrgBkLyeiqKJGIf/xVzbAyliw== 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=ftevKKrf; 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.58 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=muradm-net.20150623.gappssmtp.com header.s=20150623 header.b=ftevKKrf; 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: 215BF1A213 X-Spam-Score: 3.58 X-Migadu-Scanner: scn0.migadu.com X-TUID: 2biyKyxkdGrK * doc/guix.texi (Desktop Services): Provide documentation for seatd-service-type and greetd-service-type including configuration and sample usage. --- doc/guix.texi | 187 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 187 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 17ecc3ad0f..01a895fe62 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 @@ -19702,6 +19703,192 @@ 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 + ;; also ask terminal 1 to become active + (greetd-terminal-configuration (terminal-vt "1") (terminal-switch #t)) + (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 %base-services + ;; seatd/greetd combination can replace these + ;; greetd provides its own PAM service + (delete login-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.sock"}) +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{terminal-switch} (default: @code{#f}) +Make this terminal active on start of @code{greetd}. + +@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