From patchwork Sun Dec 31 11:39:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 58243 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 B9C5A27BBEC; Sun, 31 Dec 2023 11:41:57 +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 A945727BBE2 for ; Sun, 31 Dec 2023 11:41:55 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJuBt-0001iW-C6; Sun, 31 Dec 2023 06:41:13 -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 1rJuBk-0001dw-Eo for guix-patches@gnu.org; Sun, 31 Dec 2023 06:41:04 -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 1rJuBk-0003jo-6i for guix-patches@gnu.org; Sun, 31 Dec 2023 06:41:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rJuBl-0004Vv-8w for guix-patches@gnu.org; Sun, 31 Dec 2023 06:41:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68169] [PATCH 6/9] system: Export default guile config. Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 31 Dec 2023 11:41:05 +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.170402284417240 (code B ref 68169); Sun, 31 Dec 2023 11:41:05 +0000 Received: (at 68169) by debbugs.gnu.org; 31 Dec 2023 11:40:44 +0000 Received: from localhost ([127.0.0.1]:45738 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJuBP-0004Tu-9s for submit@debbugs.gnu.org; Sun, 31 Dec 2023 06:40:43 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:55601) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJuBJ-0004Sr-IB for 68169@debbugs.gnu.org; Sun, 31 Dec 2023 06:40:38 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-40d76923ec4so18480035e9.3 for <68169@debbugs.gnu.org>; Sun, 31 Dec 2023 03:40:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704022830; x=1704627630; 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=zS3TDQRU6oTfpiN2hyguiMQit08ILUZ9ceEkOd2kOgw=; b=NuySeQOzlqTwwYV2+4yf/+fjpBbLO7yuLiWqQVv7EaDFBWe4IRxa3Ni032AM/X0UG6 cOLyTcoYj7VvXEK6giSCRduEnelUBII9GFTgZS2Q09UggvTWsIK+1olO16V726Uw8476 0OPP/1m8VOjNIU9KOXPHRjdjnJi7dYYSY9ZNRbWi3qzWjrXknk6yM2pWoA/RqVO35MIX W6b6TUg/UzvxCTxurqrBGyKwdDMSJPTL5d4+td8PgQX0QO9HkhSweldU6EyOO0hYIs5F LhFgGhqEWtMRZz5ZhpjAZxUlCJBH30RoHYEjfLzqHVV9XhDrR3paH31GdujstVESzRSm LdMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704022830; x=1704627630; 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=zS3TDQRU6oTfpiN2hyguiMQit08ILUZ9ceEkOd2kOgw=; b=Uc4iTS/o+c8hfcxnfAMKn7SAghFzgKcmU0r6nwpK/YxiUCUhiwCH+Ok5jZBUftn/vG raj+90+fQfC0MsuvOq7XJjpwHW0cPmnkamqJMdIu4LwsfRE79nkCLNJlzVO01u8DVwj4 nMejDf8sdsUfD2maHWO9cLNfIy3qoPw+gzgBuHQJMSnQaOK66f48Hb6NfEtb5aOIqBbG BR53b7BE7nbIyxD1O8wA6RfWdliiqqJF8biDotbbD6YqFChsQRIThn86A9HFpYWL11/y Btcw47G186/k7rS2Hm2skg9JKVgTwkpW43YbLuylAsEbK5/PFRyl5JQTV2EMR3HQyiGC YFNA== X-Gm-Message-State: AOJu0YyWcLYm0J3MOC6QW/SnyqKrTaXa6CnJX/PQguYPSzPo57HSh1QJ 5fYNHfPDnAUfS8UZfUhodzbl7hu9xvVf5Q== X-Google-Smtp-Source: AGHT+IHl1+5nHgYynn6t1EQuS48FB3h1XZoqPec9XGeRnNmN5SPHdEpipiW1whM3ulpSsap7anP0VQ== X-Received: by 2002:a05:600c:46cc:b0:40b:473d:6b82 with SMTP id q12-20020a05600c46cc00b0040b473d6b82mr7986481wmo.12.1704022830582; Sun, 31 Dec 2023 03:40:30 -0800 (PST) Received: from localhost ([141.226.15.142]) by smtp.gmail.com with ESMTPSA id l4-20020a05600c1d0400b0040d3276ba19sm37116479wms.25.2023.12.31.03.40.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Dec 2023 03:40:30 -0800 (PST) From: Efraim Flashner Date: Sun, 31 Dec 2023 13:39:45 +0200 Message-ID: <06d01fdafe2fd52169e57943843e4a49b9dc4d77.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-dotguile): Extract from default-skeletons, export. (default-skeletons): Use %default-dotguile. Change-Id: Ibe91b3b517ae542bd28070a08e14152f87ed75ec --- gnu/system/shadow.scm | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm index a8bc2d9567..ca9c65e6d4 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -69,6 +69,7 @@ (define-module (gnu system shadow) %default-xdefaults %default-gdbinit %default-nanorc + %default-dotguile default-skeletons skeleton-directory %base-groups @@ -217,25 +218,9 @@ (define %default-nanorc "# Include all the syntax highlighting modules. include /run/current-system/profile/share/nano/*.nanorc\n")) -(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 %default-zprofile) - (xdefaults %default-xdefaults) - (gdbinit %default-gdbinit)) - `((".bash_profile" ,profile) - (".bashrc" ,bashrc) - ;; Zsh sources ~/.zprofile before ~/.zshrc, and it sources ~/.zlogin - ;; after ~/.zshrc. To avoid interfering with any customizations a user - ;; may have made in their ~/.zshrc, put this in .zprofile, not .zlogin. - (".zprofile" ,zprofile) - (".nanorc" ,%default-nanorc) - (".Xdefaults" ,xdefaults) - (".guile" ,(plain-file "dot-guile" - "(cond ((false-if-exception (resolve-interface '(ice-9 readline))) +(define %default-dotguile + (plain-file "dot-guile" + "(cond ((false-if-exception (resolve-interface '(ice-9 readline))) => (lambda (module) ;; Enable completion and input history at the REPL. @@ -253,6 +238,25 @@ (define (default-skeletons) (else (display \"Consider installing the 'guile-colorized' package for a colorful Guile experience.\\n\\n\"))))\n")) + +(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 %default-zprofile) + (xdefaults %default-xdefaults) + (gdbinit %default-gdbinit)) + `((".bash_profile" ,profile) + (".bashrc" ,bashrc) + ;; Zsh sources ~/.zprofile before ~/.zshrc, and it sources ~/.zlogin + ;; after ~/.zshrc. To avoid interfering with any customizations a user + ;; may have made in their ~/.zshrc, put this in .zprofile, not .zlogin. + (".zprofile" ,zprofile) + (".nanorc" ,%default-nanorc) + (".Xdefaults" ,xdefaults) + (".guile" ,%default-dotguile) (".gdbinit" ,gdbinit)))) (define (skeleton-directory skeletons)