From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id WHN/GbrHImHF8wAAgWs5BA (envelope-from ) for ; Sun, 22 Aug 2021 23:55:06 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id YBMOFbrHImGgCAAAbx9fmQ (envelope-from ) for ; Sun, 22 Aug 2021 21:55:06 +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 077801BBF8 for ; Sun, 22 Aug 2021 23:55:06 +0200 (CEST) Received: from localhost ([::1]:53968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mHvQn-0002Sg-47 for larch@yhetil.org; Sun, 22 Aug 2021 17:55:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mHvNu-0007uj-BR for guix-patches@gnu.org; Sun, 22 Aug 2021 17:52:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56637) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mHvNu-0002y2-4F for guix-patches@gnu.org; Sun, 22 Aug 2021 17:52:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mHvNu-0007ee-3H for guix-patches@gnu.org; Sun, 22 Aug 2021 17:52:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v5 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: Sun, 22 Aug 2021 21:52: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.162966909929319 (code B ref 49969); Sun, 22 Aug 2021 21:52:06 +0000 Received: (at 49969) by debbugs.gnu.org; 22 Aug 2021 21:51:39 +0000 Received: from localhost ([127.0.0.1]:39940 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHvNS-0007cj-RP for submit@debbugs.gnu.org; Sun, 22 Aug 2021 17:51:39 -0400 Received: from mail-ej1-f52.google.com ([209.85.218.52]:45877) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mHvN7-0007az-M1 for 49969@debbugs.gnu.org; Sun, 22 Aug 2021 17:51:18 -0400 Received: by mail-ej1-f52.google.com with SMTP id e21so16833970ejz.12 for <49969@debbugs.gnu.org>; Sun, 22 Aug 2021 14:51:17 -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=YqgNTsAIUCjuQ/rnza+49PvRULkOaokN/a+4k2+tycE=; b=EwWrkCQQLch4tm9VsHuTD9bVQqPjStVfU/tLoTxJFNk47EPz6pdOJAmm5jy1SF/z6O 9AwvzLxCWk8TSqV68ymdmyFF7HI2ZQGaUbDGkNeioIU3OY/P1DUZwNXWlPdQreZ94fc/ OxdADVShlBw7xdNRgO9OyLr1JoclkBLdMoZKKTMhQfqJdUSnkx6tOqd6a9PL9FAHc/TT CzEBJuMIqvnaZnjP3e1GVvaSydAFcE+AsJ1PR4zF18Q3Iebcc48nKyq/nc2Vnu0OSx5a HZxJvf8uxiYp8rAjfxpIiCL+1OFEOZsVzKcX5kyWjnExAnvzaxTNw2wZ44eYIko4ALGY aEKA== 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=YqgNTsAIUCjuQ/rnza+49PvRULkOaokN/a+4k2+tycE=; b=PyVVl3WgwcCkVC6nOFX6RQ7IYi1YxeGjObGa+OWt9yollnsmFOeHKredNacodCrD4c ecYuxIXRVin1frkpOBvb0VlzlLI98k92uCMeRgdDlf8dAcnBmN62EZidZ09IrXn+HSaE KaYu7fzeaoldliQaHSCEsDJvd4GCtZKdEHp18MOM/OxHQH0STmWUoAcu19oh+3CJ1gxM bvGkiqiyZua1uBeirGK/MRpJ9VJqRnO+IkVim+weonoZuS04xBsuyQdmi4HaN6nfws1s OOLE231GdFK3bMQzAsJrStMExFEer9rE7je9BFcd279IV6QIA6JnoupKw9C1k79eafz0 w5lA== X-Gm-Message-State: AOAM533Qh69OgrZrCGFJyQGST4t3pv+rvjvT9Uqf5mkIq0OSqiqkG3Cq wWeDFh8xlBJ5NBAhYNY5TVnE9BUbJ//iFA== X-Google-Smtp-Source: ABdhPJwHOOKzxfRMKHNi9TlyW2ypqpU7AYBsJ5fZyg/hajxlLhQbjac1NL/1uiyAKOnaIsJReZj+NQ== X-Received: by 2002:a17:906:49d5:: with SMTP id w21mr32029436ejv.30.1629669071612; Sun, 22 Aug 2021 14:51:11 -0700 (PDT) Received: from localhost.localdomain ([31.142.76.217]) by smtp.gmail.com with ESMTPSA id q5sm7959755edt.50.2021.08.22.14.51.10 for <49969@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Aug 2021 14:51:11 -0700 (PDT) From: muradm Date: Mon, 23 Aug 2021 00:50:48 +0300 Message-Id: <20210822215048.20480-11-mail@muradm.net> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210822215048.20480-1-mail@muradm.net> References: <20210819143133.6398-1-mail@muradm.net> <20210822215048.20480-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=1629669306; 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=YqgNTsAIUCjuQ/rnza+49PvRULkOaokN/a+4k2+tycE=; b=isCjZFRsl5y7oG8BhLNAv5Dswiw1bkbeSeCpW/5aSLBnNVEYm9ObJiIrPCazXIUV+zlvVX zRcn54hjcjPRtjbJkkEeU/FlpGFG1ZSZYAOhXCGcnz4PVH33NGEOPpmS5m5DaTtQMxDsbb bb8grza68sYjvDlyO7rsGnvCFvAAt+Qkn6I33FxhmDyXlCCjfY4Re4dsjWdePpSzZlObp3 rXKdnCB5AnA2rCAbFu0yF/B5lHfVJ9Vuikg9TDqgjErNM5pMPQ7EARBMFq5BVH+R23/IO5 tPRNFSoC8+GA+TW5AUxM1dA0LyXxH5sQJzb4c2ZsdmBr1fIgfefI+Okz7xhJJA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1629669306; a=rsa-sha256; cv=none; b=Sv8IHFV9RjMq9D5l9obRGegmPuRFwOo1Oam10QoULyO78hD45LPo4W4rY0Oxi0e7kWJTrE vTXE7dxpjuvVm3mvPdo1Pb/xwWB3lWJoIp/WFCLkNsIgDwrwSSVR7ne8DN4mBfF4PSOgJh /XjxIJ+QAQIQgGAIHfY1qadMA5ElMUhhLf1WN8Qaz9D13VnynQd/0tJ391EM6lyFXaoOaz lQ+sEqo49oLCaOgEln8OdEFrvAmkLmAuzKB8Z1WJ/GCarj6bKysVKkdURu1meAxhboPT/2 8Jr35CSi4U8bGBnPbZM6Cw6UNGiu7sIJZGOp379zF8KrPP6aFG/5h8ZGK8Lgww== 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=EwWrkCQQ; 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.57 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=muradm-net.20150623.gappssmtp.com header.s=20150623 header.b=EwWrkCQQ; 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: 077801BBF8 X-Spam-Score: 3.57 X-Migadu-Scanner: scn0.migadu.com X-TUID: ZiOhQjkzmaz7 * 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 2b8448c856..1590c29f9b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -96,6 +96,7 @@ Copyright @copyright{} 2021 Domagoj Stolfa@* Copyright @copyright{} 2021 Hui Lu@* Copyright @copyright{} 2021 pukkamustard@* Copyright @copyright{} 2021 Alice Brenon@* +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 @@ -19767,6 +19768,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