From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id gPLKAzubFWH1LwAAgWs5BA (envelope-from ) for ; Fri, 13 Aug 2021 00:05:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id +JLaOjqbFWH5QwAA1q6Kng (envelope-from ) for ; Thu, 12 Aug 2021 22:05:46 +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 B38C32132A for ; Fri, 13 Aug 2021 00:05:46 +0200 (CEST) Received: from localhost ([::1]:44536 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mEIpd-0001uc-R2 for larch@yhetil.org; Thu, 12 Aug 2021 18:05:45 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35564) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mEIp0-0000WL-TE for guix-patches@gnu.org; Thu, 12 Aug 2021 18:05:07 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56752) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mEIp0-00069b-L7 for guix-patches@gnu.org; Thu, 12 Aug 2021 18:05:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mEIp0-0002wq-Ff for guix-patches@gnu.org; Thu, 12 Aug 2021 18:05:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v3 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, 12 Aug 2021 22:05:06 +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.162880589611234 (code B ref 49969); Thu, 12 Aug 2021 22:05:06 +0000 Received: (at 49969) by debbugs.gnu.org; 12 Aug 2021 22:04:56 +0000 Received: from localhost ([127.0.0.1]:40054 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEIop-0002v3-Et for submit@debbugs.gnu.org; Thu, 12 Aug 2021 18:04:55 -0400 Received: from mail-ed1-f43.google.com ([209.85.208.43]:37714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEIol-0002tR-Tr for 49969@debbugs.gnu.org; Thu, 12 Aug 2021 18:04:52 -0400 Received: by mail-ed1-f43.google.com with SMTP id g21so12144870edb.4 for <49969@debbugs.gnu.org>; Thu, 12 Aug 2021 15:04:51 -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=PhTX7jcScgkGl1cYJiOkS0WUjZf4D6PwHWC4hMrfT+g=; b=k2P8zjxWpiI4661DnLRuw2A/FipVAv8xVZUbLK6Cw1wwPDySLGQNA2/mJAp6T5tTcq WtFoQGWx0P8V6YQ47XJOoDzhPSQ7PwHqNBCBaWYacl+kcqCbrEYE3OWl1mCUbSsYA33R g3B25VCVfRTtJiqfAPc5q4jL9Ha8bNO8s7N9QfZq7da8O7DV/OCLCrqXEdeXryJrP/Jr rYxZutUMLhAvASwZNhVepDoOLkqoPU/y7mXH0OzOMlbgmaq/fcGk5PIpxLJJGyF1LHW9 xGtKdT+3ljPao1LtxtxrzZLf0LhdkS5cBYTPNMxdZWsbatZ0IbVqC8tteJC8oDZt3oRb /2yg== 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=PhTX7jcScgkGl1cYJiOkS0WUjZf4D6PwHWC4hMrfT+g=; b=k0ITEGPadV3RaFVeSueZh9e9MaTYZOhFydtD9c9NLN3mJLIHHcqEzNotR8uphe5rJt BIFzQtKAJdMdABaM/AoFuu4lSHa1nouUVmGoBq0GoO2a8X65eVE1efm6rg6hZ9BUcBTA z1iHrrBWWZifIfvqg/UxsDCBH+KR9wIgZiD3OSGq0M2k4UuCgoWCsVeHyZus9vbr7KZm rFvUANxerOn3Vg7iIBFDq+HD9l1OE5sma8j9f56Pgxw73NM/ZEb3ThfE+1jIFS8431mG wJKVAWqS4L1slp7thFqUvlpu786rlutb1xLxGkJWxSPwSXGEvTxZz/cSt37Z4RjYCbmK lWLg== X-Gm-Message-State: AOAM532TMZbKaOe0uz4vsa6AZ7bpMq3hbmO24RCyIUhlv2idPjwBdDST B/93KuFmGH/MnInM3fTGGK3H1FgbO//LVA== X-Google-Smtp-Source: ABdhPJx0IjIJYkAtUA9ij+wdw6hhO0meJC1W6bEQoOowFMh2hTLYqYUNUxIaRz2BtxHHYyb2qu8AMA== X-Received: by 2002:a05:6402:2937:: with SMTP id ee55mr709731edb.91.1628805886068; Thu, 12 Aug 2021 15:04:46 -0700 (PDT) Received: from localhost.localdomain ([5.24.104.153]) by smtp.gmail.com with ESMTPSA id o23sm1750302eds.75.2021.08.12.15.04.45 for <49969@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Aug 2021 15:04:45 -0700 (PDT) From: muradm Date: Fri, 13 Aug 2021 01:04:20 +0300 Message-Id: <20210812220420.24118-11-mail@muradm.net> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210812220022.24025-1-mail@muradm.net> References: <20210812220022.24025-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=1628805946; 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=PhTX7jcScgkGl1cYJiOkS0WUjZf4D6PwHWC4hMrfT+g=; b=rLyswujVnpIdftuMb0S3O00BmBM///WZmKL04zn33QX1xBd29MY9KTKMXZsaWv6HbRGhnR CxhHhxsUwez0ae6MfsQqtI68FSmgjQ4tlqijHLZyKR5jBQhZR7avRaxpBrrIs0YyanlFUv LsDrR/bgVKBK/KyCZayfPF34e5hvv84tC45hKx337/+sg0o4WG0JNt5fwJsJV2MFTaSdlH tvYIQk3aypaKYQMOCLEX/kjuYediylj8gVU/1rqcjqi0OAGImVEzXnPR7m1ACph+t4/SxN WuB/TrE8ZmbA4oQmARz/mv07hvbNqXzK2Dfx2E7nPwGmUpofta/vrRNpN4561w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628805946; a=rsa-sha256; cv=none; b=VKfg8urPcRtuhX8RdD83bQxzWoQLg07azAJwDJ9kP+4YpHxY7Cny3G1TREY9+Qzh3lBq/k BdjD3vXIEeOOMJ+fPK8dd+pBErWK7NVBd3iAgXn2WfbdzTxQUFzkJXYiV6rOSNTsAfe1ly CzyZZt5/upJihQ7xMK4GqsSCKUS0ku2Bg3CvxiJFpnDleEh2iAvxRDyu6EBKX+9pP+5v30 dO0BCXnBwcUjqLgGaT8qL3pM6nDq1yAaFEyGjnWZ+kvEQqNXMMQ7zmiXBj31DLPHOtxIj5 DLGvojdtJXwQ1L5Djl3LPmoC6kt7sMoumQUqBX0Oic4egUWHaVZVjMykfpcsYw== 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=k2P8zjxW; 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=k2P8zjxW; 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: B38C32132A X-Spam-Score: 3.59 X-Migadu-Scanner: scn0.migadu.com X-TUID: DwclNsLJkQXq * 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 78c1c09858..1e5838ce32 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 %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{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