all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: jlicht@fsfe.org
To: 60041@debbugs.gnu.org
Subject: [bug#60041] [PATCH] services: greetd: Add 'source-profile?' configuration field.
Date: Tue, 13 Dec 2022 19:35:59 +0100	[thread overview]
Message-ID: <ce8297697587dcb34fe86362bf2ec72a7fc74da5.1670956545.git.jlicht@fsfe.org> (raw)

From: Jelle Licht <jlicht@fsfe.org>

* gnu/services/base.scm (<greetd-terminal-configuration>)[source-profile?]:
New field.
(make-greetd-terminal-configuration-file): Serialize new field to
configuration file.
* doc/guix.texi (Base Services): Document it.
---
 doc/guix.texi         | 4 ++++
 gnu/services/base.scm | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/doc/guix.texi b/doc/guix.texi
index b270964542..bc71337b9c 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -18798,6 +18798,10 @@ Base Services
 @item @code{terminal-switch} (default: @code{#f})
 Make this terminal active on start of @code{greetd}.
 
+@item @code{source-profile?} (default: @code{#t})
+Whether to source @file{/etc/profile} and @file{~/.profile}, when they
+exist.
+
 @item @code{default-session-user} (default: @samp{"greeter"})
 The user to use for running the greeter.
 
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 4908af8edd..8cda1d2e16 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -3037,6 +3037,7 @@ (define-record-type* <greetd-terminal-configuration>
                  (default (default-log-file-name this-record)))
   (terminal-vt greetd-terminal-vt (default "7"))
   (terminal-switch greetd-terminal-switch (default #f))
+  (source-profile? greetd-source-profile? (default #t))
   (default-session-user greetd-default-session-user (default "greeter"))
   (default-session-command greetd-default-session-command
     (default (greetd-agreety-session))))
@@ -3050,12 +3051,14 @@ (define (default-log-file-name config)
 (define (make-greetd-terminal-configuration-file config)
   (let*
       ((config-file-name (greetd-config-file-name config))
+       (source-profile? (greetd-source-profile? config))
        (terminal-vt (greetd-terminal-vt config))
        (terminal-switch (greetd-terminal-switch config))
        (default-session-user (greetd-default-session-user config))
        (default-session-command (greetd-default-session-command config)))
     (mixed-text-file
      config-file-name
+     "source_profile = " (if source-profile? "true" "false") "\n"
      "[terminal]\n"
      "vt = " terminal-vt "\n"
      "switch = " (if terminal-switch "true" "false") "\n"

base-commit: d83eef22b25a8717a62ba9d3432b7a8657b7b50b
-- 
2.38.1





             reply	other threads:[~2022-12-13 18:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13 18:35 jlicht [this message]
2023-01-15 20:18 ` bug#60041: [PATCH] services: greetd: Add 'source-profile?' configuration field Jelle Licht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ce8297697587dcb34fe86362bf2ec72a7fc74da5.1670956545.git.jlicht@fsfe.org \
    --to=jlicht@fsfe.org \
    --cc=60041@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.