From patchwork Sun Dec 31 11:39:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Efraim Flashner X-Patchwork-Id: 21292 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 0C0E327BBE2; Sun, 31 Dec 2023 11:42:01 +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 2491027BBEA for ; Sun, 31 Dec 2023 11:42:00 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rJuBn-0001gR-2A; Sun, 31 Dec 2023 06:41:07 -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-0001eV-TA for guix-patches@gnu.org; Sun, 31 Dec 2023 06:41:05 -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-0003jt-Hn 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-0004W3-Ki for guix-patches@gnu.org; Sun, 31 Dec 2023 06:41:05 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68169] [PATCH 7/9] system: Add default guix-home-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.170402284417253 (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]:45741 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJuBP-0004U1-Rt for submit@debbugs.gnu.org; Sun, 31 Dec 2023 06:40:44 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:45067) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rJuBL-0004T4-Ew for 68169@debbugs.gnu.org; Sun, 31 Dec 2023 06:40:39 -0500 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-40d2764c0f2so106469475e9.2 for <68169@debbugs.gnu.org>; Sun, 31 Dec 2023 03:40:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704022832; x=1704627632; 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=biV/AMH1DqP+KKguLmy/jPyYFRgPzHvZIOfPozS/pdc=; b=huKkgKPpM1wA8UGocvIAZUAJZpWEqrBTAEkBjH43bDgSkC9U8jWWwNJEuu6fw5nVQU p1k/dYuZVw3TGSQZB9671X9zAzxtpq+Y2mhObx97Is9IjHcrCSIynGuo3WOqOySG3b+J 6yG60GGkuxhdCPYDDePrf+6/59UyAVNQUQOBDe9cKXcF+nAv6OkUISm5PNveBdRrZbn9 tKG0x5tEWHuh4ZjliMNiFl6niBur8DlBbnO0YmXNIVW/2RdiZP3QriFAlF0O1MhEn+w/ NFRoY/EcBCK/OB7Xrl/2X305Dd1um9Y6lfEVyC+mq0MnalNaR+m7d14FCTgaia0Lkous TFEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704022832; x=1704627632; 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=biV/AMH1DqP+KKguLmy/jPyYFRgPzHvZIOfPozS/pdc=; b=Ca/E/dzeFUI43yQgVLexkGPXCWT/Tz66znRpdYM1nFEYim3Oq001kxtUr5KZDgeXMk vx8+QzQv/DV+5P1mSPivRhbo3NjCLSORx5YvCD6SWrMSvUNLUGnP50ps4Jxrji7jsVPt 7lJpWcBJZvhMqIpVekst06NX3CcR4jeu+f7eUFX6DIsax5lkVqcfEVqXDRzrNqCcjfRP TyT89p/Pq7LwIYXoZIjincEHsuuO2OSbmPeJBrXK5vdnkYNZbuF6yGjByvULGLvYESHm 1/R+E1Dh0YZmTmL/6QdzAtidG2gzo0uzOqvVxq4B+wOYXL6avQlwywzVDNttnx/tL7Cz FAiw== X-Gm-Message-State: AOJu0Yw3pvXvbnhpyBiR8vVkkr8SZYUIRmillnLoR+8tP4Qlfvc9tlSf TAc43ip9sDk/RCnw2fgXEnvkLYmAs8eOIw== X-Google-Smtp-Source: AGHT+IGVv7g94bGg6Yt18XQRUciHqO2VqIpfPcTWDezIYDFFXudpYB0bN0yRPt1Z1E4xpLXv6Vp7PQ== X-Received: by 2002:a05:600c:a43:b0:40d:6cb7:7ee3 with SMTP id c3-20020a05600c0a4300b0040d6cb77ee3mr2470937wmq.124.1704022832627; Sun, 31 Dec 2023 03:40:32 -0800 (PST) Received: from localhost ([141.226.15.142]) by smtp.gmail.com with ESMTPSA id ay14-20020a05600c1e0e00b0040c6ab53cd2sm37898384wmb.10.2023.12.31.03.40.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Dec 2023 03:40:32 -0800 (PST) From: Efraim Flashner Date: Sun, 31 Dec 2023 13:39:46 +0200 Message-ID: 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 (%deafult-skeleton-home-config): New variable. (default-skeletons): Add it. Change-Id: Ida4cca8b1b3674491a4f18d94bc1b12d426575ba --- gnu/system/shadow.scm | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm index ca9c65e6d4..6c8e02953a 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -70,6 +70,7 @@ (define-module (gnu system shadow) %default-gdbinit %default-nanorc %default-dotguile + %default-skeleton-home-config default-skeletons skeleton-directory %base-groups @@ -239,6 +240,37 @@ (define %default-dotguile (display \"Consider installing the 'guile-colorized' package for a colorful Guile experience.\\n\\n\"))))\n")) +(define %default-skeleton-home-config + (plain-file "default-home-config" "\ +;; This is a sample Guix Home configuration which can help setup your +;; home directory in the same declarative manner as Guix System. +;; For more information, see the Home Configuration section of the manual. +(define-module (guix-home-config) + #:use-module (gnu home) + #:use-module (gnu home services) + #:use-module (gnu home services shells) + #:use-module (gnu services) + #:use-module (gnu system shadow)) + +(define home-config + (home-environment + (services + (list + ;; Uncomment the shell you wish to use for your user: + ;(service home-bash-service-type) + ;(service home-fish-service-type) + ;(service home-zsh-service-type) + + (service home-files-service-type + `((\".guile\" ,%default-dotguile) + (\".Xdefaults\" ,%default-xdefaults))) + + (service home-xdg-configuration-files-service-type + `((\"gdb/gdbinit\" ,%default-gdbinit) + (\"nano/nanorc\" ,%default-nanorc))))))) + +home-config")) + (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." @@ -257,7 +289,8 @@ (define (default-skeletons) (".nanorc" ,%default-nanorc) (".Xdefaults" ,xdefaults) (".guile" ,%default-dotguile) - (".gdbinit" ,gdbinit)))) + (".gdbinit" ,gdbinit) + ("guix-home-config.scm" ,%default-skeleton-home-config)))) (define (skeleton-directory skeletons) "Return a directory containing SKELETONS, a list of name/derivation tuples."