From patchwork Sun Dec 31 11:39:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 58238 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6BB1F27BBEA; Sun, 31 Dec 2023 11:41:22 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C374427BBE9 for ; Sun, 31 Dec 2023 11:41:21 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJuBm-0001fk-UP; Sun, 31 Dec 2023 06:41:06 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rJuBi-0001Zg-IK for guix-patches@gnu.org; Sun, 31 Dec 2023 06:41:02 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rJuBi-0003jE-A4 for guix-patches@gnu.org; Sun, 31 Dec 2023 06:41:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rJuBj-0004VS-CN for guix-patches@gnu.org; Sun, 31 Dec 2023 06:41:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68169] [PATCH 2/9] system: Export default zprofile. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 31 Dec 2023 11:41:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68169 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 68169@debbugs.gnu.org Cc: Efraim Flashner Received: via spool by 68169-submit@debbugs.gnu.org id=B68169.170402283217162 (code B ref 68169); Sun, 31 Dec 2023 11:41:03 +0000 Received: (at 68169) by debbugs.gnu.org; 31 Dec 2023 11:40:32 +0000 Received: from localhost ([127.0.0.1]:45724 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJuBD-0004Sj-FF for submit@debbugs.gnu.org; Sun, 31 Dec 2023 06:40:31 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:55552) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJuBB-0004ST-AO for 68169@debbugs.gnu.org; Sun, 31 Dec 2023 06:40:29 -0500 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3373bc6d625so362202f8f.3 for <68169@debbugs.gnu.org>; Sun, 31 Dec 2023 03:40:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704022822; x=1704627622; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=IUXBYBGe6igm5Qy4nLLq/puzYPH3Q3amd+a1VN/fius=; b=BCsd4KIc6H2avK+ZCsp8wQc/G+owXQVhOhRbRNoOSxUfbEcMFV5cgElw1V8d+Occdf h225aiJ5xWMRYtHJdMli+Os2lQ4jpgwi0tKryf5pCeGKg6A+fueVdQ82wPNm3F+zc1Lx NW8EqaOFJg+M1mYZj/asaUN9hHhl8Lp2S3+ymGnqwnYhCRk79JHeHk8jjdS46U1BtfPp 6PossgAs18BNlVRdE8E7kAs3dnTDk5aQujwEgi2231Evv3ygovAshv+SDuwkIXtzX0J7 pxDCjH7lCdaPwpetXWX069ek1YztqICjtDWp47vU+4faoEfXNhypYWhMnbitN1oC4EWu RtGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704022822; x=1704627622; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=IUXBYBGe6igm5Qy4nLLq/puzYPH3Q3amd+a1VN/fius=; b=rUnPvn6Z0ov0jx7LJvTJGmDYpa4AHfKmMlAnFMg7v7EGrm8MqcoHKhQUINux2tzcHS NQIROq+myV/hcr5c5ckNXhG0Xxwhj/39e5zFwMfHpDxuMFcRN4ZgG0JRrqwipOl/L8qF ybjC2GKt1wi3dI1yEka6aTWR3ClsFtMAA7/gNZ7ntBFZcqG6O/2qZvmHZi16i1T6JX+m oFnxD5XDTsRsMSxgsk5Qpjf42WEW74DCgKTSzEyjw85048Dqn+K18zLHQKdbM9iGoPxc +bqqzTKMthepsvb8XHLP29978s4x3hEAwpTpqGLjozrtci88+ycnNSIy0h9iTLSXST7U bXkA== X-Gm-Message-State: AOJu0Yws3fK5bKgb+tKqw4beSiyswqwOLqz8kIQn6bphG3NU3LyHnAlv OxFlebb+6CfCfuiMtWUlMvu0UZZfPCvw0g== X-Google-Smtp-Source: AGHT+IF+jbVxxryTsMeXZYLJDe1sZ6lX16YBOp2rnQWv9Y/CHnLdb/p5257Yt9jcPELYoSOZ5wx9bQ== X-Received: by 2002:adf:e790:0:b0:336:7562:3376 with SMTP id n16-20020adfe790000000b0033675623376mr7281259wrm.102.1704022822464; Sun, 31 Dec 2023 03:40:22 -0800 (PST) Received: from localhost ([141.226.15.142]) by smtp.gmail.com with ESMTPSA id a15-20020adfed0f000000b00336673a4153sm23409122wro.80.2023.12.31.03.40.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Dec 2023 03:40:21 -0800 (PST) From: Efraim Flashner Date: Sun, 31 Dec 2023 13:39:41 +0200 Message-ID: <89274dd664f5c6316dfbb387e6e39e11ad96efa6.1704021933.git.efraim@flashner.co.il> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/system/shadow.scm (%default-zprofile): Extract from default-skeletons, export. (default-skeletons): Use %default-zprofile. Change-Id: I6c6e158bca2e462a2eae709fbc2c25a2c7f3f8b4 --- gnu/system/shadow.scm | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm index cd4e1a9156..9b1678c54d 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -65,6 +65,7 @@ (define-module (gnu system shadow) #:export (%default-bashrc %default-bash-profile + %default-zprofile default-skeletons skeleton-directory %base-groups @@ -166,25 +167,28 @@ (define %default-bash-profile export PATH=/run/setuid-programs:$PATH ")) +(define %default-zprofile + (plain-file "zprofile" "\ +# Honor system-wide environment variables +source /etc/profile + +# Merge search-paths from multiple profiles, the order matters. +eval \"$(guix package --search-paths \\ +-p $HOME/.config/guix/current \\ +-p $HOME/.guix-profile \\ +-p /run/current-system/profile)\" + +# Prepend setuid programs. +export PATH=/run/setuid-programs:$PATH +")) + (define (default-skeletons) "Return the default skeleton files for /etc/skel. These files are copied by 'useradd' in the home directory of newly created user accounts." - (let ((profile %default-bash-profile) - (bashrc %default-bashrc) - (zprofile (plain-file "zprofile" "\ -# Honor system-wide environment variables -source /etc/profile - -# Merge search-paths from multiple profiles, the order matters. -eval \"$(guix package --search-paths \\ --p $HOME/.config/guix/current \\ --p $HOME/.guix-profile \\ --p /run/current-system/profile)\" - -# Prepend setuid programs. -export PATH=/run/setuid-programs:$PATH -")) + (let ((profile %default-bash-profile) + (bashrc %default-bashrc) + (zprofile %default-zprofile) (xdefaults (plain-file "Xdefaults" "\ XTerm*utf8: always XTerm*metaSendsEscape: true\n"))