From patchwork Sat Oct 2 13:45:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Oleg Pykhalov X-Patchwork-Id: 33563 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 44E1A27BBE3; Sat, 2 Oct 2021 14:50:07 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A994627BBE1 for ; Sat, 2 Oct 2021 14:50:06 +0100 (BST) Received: from localhost ([::1]:57406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWfOv-00030s-Pw for patchwork@mira.cbaines.net; Sat, 02 Oct 2021 09:50:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41180) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWfMw-0007zn-EG for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46816) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWfMw-0002nE-77 for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mWfMw-0002uf-5D for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50967] [PATCH 01/12] tests: Add tests for guix home cli. References: <20211002134352.5735-1-go.wigust@gmail.com> In-Reply-To: <20211002134352.5735-1-go.wigust@gmail.com> Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 02 Oct 2021 13:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50967 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50967@debbugs.gnu.org Cc: Oleg Pykhalov , Andrew Tropin Received: via spool by 50967-submit@debbugs.gnu.org id=B50967.163318244910994 (code B ref 50967); Sat, 02 Oct 2021 13:48:02 +0000 Received: (at 50967) by debbugs.gnu.org; 2 Oct 2021 13:47:29 +0000 Received: from localhost ([127.0.0.1]:58331 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWfME-0002pb-V6 for submit@debbugs.gnu.org; Sat, 02 Oct 2021 09:47:28 -0400 Received: from mail-lf1-f52.google.com ([209.85.167.52]:40731) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWfMD-0002pD-NX for 50967@debbugs.gnu.org; Sat, 02 Oct 2021 09:47:18 -0400 Received: by mail-lf1-f52.google.com with SMTP id y23so15366154lfj.7 for <50967@debbugs.gnu.org>; Sat, 02 Oct 2021 06:47:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UkdCoo77p/t5vQjaQv+R/Tz/mjqWKuFuIBNUJn+AnCU=; b=HQXr2XNvSA6gFD58mW5o2UjOcrH7rkXKHDCwZiEJSs7bXWr7iiCGiM177IQ7yslC9o ys3KcIzBKaZLH+ys25CYeASRLxMXXPjVyKRKwJ/EBnwj6o3mxz94hLq8rJqPlxxXk8Z2 rXlFDhM3upyNoNkOCVmjKUgXWYrSMAwZ2VayXh4BGdOrR4/9tnYzhuEFlrMi3h7OGAZF 3jg9BxzRiSltBUXgjuwqIy+MaqhZmJz6lBD8H7AEMU65fseEevjIO47wMLiLP0MCAdH6 j24sbt9DQ1cztLGLKaEe9EU9ivH8rjPW+QYvAVV2DyDYKMcQkoBwgo/51LzOmXjoDXW4 uQCg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=UkdCoo77p/t5vQjaQv+R/Tz/mjqWKuFuIBNUJn+AnCU=; b=X5k4YqanWvFz8WjgQUzZ589zyuxKZwnbGR2RaedoaCenM6DvJZjj9/Oh3D/kRtqnFQ 07TKY7FAwDYDNSRdC1Umj+sGKGS43IDxqZmPyTfkgLAixB4G4/QiL6pqPTtZzdR+hezK OH7LTZEaSjKYH6cfLmII+m3Y/8d63x/bEzhvFxt/U/8t+Xgaar7ToT/2DzQLB5dHt2w5 4cJai4lSXUi0OHqgWAhiyGAzAV8oclDEdjgm8zWx+63YNUMUUSawaP9jn++3TkW1msj5 2GCmDIX2TwZ+nWpDE1xfL7hjTbwkupywgmrOdqkLFIzJRJOPBs0MS3khjxhCAHmliZMf 9/Gw== X-Gm-Message-State: AOAM531K9pYY3sDQAszi9gUfepMtDY6JxqYrcgL+9OUwv7FbSK6YTX4C Q7GddQ5xM1QdGt1G+kfS2PQxhOBrqOs= X-Google-Smtp-Source: ABdhPJx7KevhlJzgjshfBPdn3Q0uUJdI4nECwess1WApMUfa+1e/xPntqNa00tLxjFuF3obTV2a4TQ== X-Received: by 2002:a05:6512:3dac:: with SMTP id k44mr4224234lfv.359.1633182431134; Sat, 02 Oct 2021 06:47:11 -0700 (PDT) Received: from localhost.localdomain ([88.201.161.72]) by smtp.gmail.com with ESMTPSA id e5sm952648ljj.129.2021.10.02.06.47.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Oct 2021 06:47:10 -0700 (PDT) From: Oleg Pykhalov Date: Sat, 2 Oct 2021 16:45:52 +0300 Message-Id: <20211002134603.6229-1-go.wigust@gmail.com> X-Mailer: git-send-email 2.33.0 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" X-getmail-retrieved-from-mailbox: Patches From: Andrew Tropin * tests/guix-home.sh: New file. * Makefile.am (SH_TESTS): Add tests/guix-home.sh. Signed-off-by: Oleg Pykhalov --- Makefile.am | 1 + tests/guix-home.sh | 99 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 tests/guix-home.sh diff --git a/Makefile.am b/Makefile.am index b66789fa0b..5bf2567dc8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -546,6 +546,7 @@ SH_TESTS = \ tests/guix-package-aliases.sh \ tests/guix-package-net.sh \ tests/guix-system.sh \ + tests/guix-home.sh \ tests/guix-archive.sh \ tests/guix-authenticate.sh \ tests/guix-environment.sh \ diff --git a/tests/guix-home.sh b/tests/guix-home.sh new file mode 100644 index 0000000000..cb015c907f --- /dev/null +++ b/tests/guix-home.sh @@ -0,0 +1,99 @@ +# GNU Guix --- Functional package management for GNU +# Copyright © 2021 Andrew Tropin +# +# This file is part of GNU Guix. +# +# GNU Guix is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or (at +# your option) any later version. +# +# GNU Guix is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GNU Guix. If not, see . + +# +# Test 'guix home' cli. +# + +set -e + +guix home --version + +tmpfile="t-guix-home-$$" +errorfile="t-guix-home-error-$$" + +# Note: This directory is chosen outside $builddir so that relative file name +# canonicalization doesn't mess up with 'current-source-directory', used by +# 'local-file' ('load' forces 'relative' for +# %FILE-PORT-NAME-CANONICALIZATION.) +tmpdir="${TMPDIR:-/tmp}/t-guix-home-$$" +mkdir "$tmpdir" + +trap 'rm -f "$tmpfile" "$errorfile" "$tmpdir"/*; rmdir "$tmpdir"' EXIT + +# Reporting of syntax errors. + +cat > "$tmpfile"< "$errorfile" +then + # This must not succeed. + exit 1 +else + grep "$tmpfile:3:4: error: (packages): invalid field specifier" "$errorfile" +fi + + +cat > "$tmpfile"< "$errorfile" +then + # This must not succeed. + exit 1 +else + # Guile 3.0.6 gets line/column numbers for 'read-error' wrong + # (zero-indexed): . + grep "$tmpfile:4:1: missing closing paren" "$errorfile" || \ + grep "$tmpfile:3:0: missing closing paren" "$errorfile" +fi + +# Reporting of duplicate system service declaration. + +cat > "$tmpfile" < "$errorfile" +then + # This must not succeed. + exit 1 +else + grep "guix home: error: more than one target service of type 'home-shepherd'" "$errorfile" +fi + +# Searching. + +guix home search mcron | grep "^name: home-mcron" +guix home search job manager | grep "^name: home-mcron" From patchwork Sat Oct 2 13:45:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Oleg Pykhalov X-Patchwork-Id: 33557 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 DD1E027BBE4; Sat, 2 Oct 2021 14:49:11 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id A662427BBE3 for ; Sat, 2 Oct 2021 14:49:10 +0100 (BST) Received: from localhost ([::1]:54820 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWfO1-0001Gq-Pg for patchwork@mira.cbaines.net; Sat, 02 Oct 2021 09:49:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41184) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWfMx-00081S-9O for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46818) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWfMx-0002nQ-13 for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mWfMw-0002uu-Vs for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50967] [PATCH 02/12] gnu: home-services: Move configuration to (gnu services). Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 02 Oct 2021 13:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50967 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50967@debbugs.gnu.org Cc: Oleg Pykhalov Received: via spool by 50967-submit@debbugs.gnu.org id=B50967.163318245011015 (code B ref 50967); Sat, 02 Oct 2021 13:48:02 +0000 Received: (at 50967) by debbugs.gnu.org; 2 Oct 2021 13:47:30 +0000 Received: from localhost ([127.0.0.1]:58344 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWfMP-0002rR-DX for submit@debbugs.gnu.org; Sat, 02 Oct 2021 09:47:30 -0400 Received: from mail-lf1-f45.google.com ([209.85.167.45]:37509) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWfME-0002pF-21 for 50967@debbugs.gnu.org; Sat, 02 Oct 2021 09:47:19 -0400 Received: by mail-lf1-f45.google.com with SMTP id i4so50803341lfv.4 for <50967@debbugs.gnu.org>; Sat, 02 Oct 2021 06:47:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gcHlRqfl9gUD6u8bAJSyA37bXQ8zpiGpaapwtb9WDA0=; b=B/KrXnlIAduV+d9UIb14AwLco2ym9njAIy16asc6W5hVok0w+9vX9a6HQHxD7ALbXq MnlH9caImN3O2+2wpwHq1UvsPqKTaZ1HWheN5/DcQ0Wzb/T2zuEvsb1AXG24Fe89j0iv AhZgPX0uJeX/pYPd3bcaGdk3S3J2jyukC3GTReFtHjHAt3SNdKoLG5O/K7/K7wh8KtfJ C+Ev3xwQlwKdyWsOsB0Z3roKHnYHPROhdf1+1d4w8Ochzm8FK4rAFfeqjCxVxaLAQ1pk 3rr09tds2wJ0I6bOdOXQGVyi1Bj+jXTMKLpNeMSjlRbC2IN2bWgMX7d7FXzjW6ha3erh 9sjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gcHlRqfl9gUD6u8bAJSyA37bXQ8zpiGpaapwtb9WDA0=; b=WJSZk+k5JMNM72c3TpyMhJPwHVK2/IA2Z+qSuXBHMa1fus1YRLLS4AvkspEKigvbav 9gpAUEDZ7GGf3ZBAVeao2DeKhucgaD9XnJ+mqgFFak9dtN/WE/cg9nd8r+56kpFO35qT eKxIhtd49T6PsHL2Tw4LSBuTA7qSaBnFMs3SM1Vj3NKIbB54IEG7kcxDjX/d2x5qh3YX IF0UychqOSJrRxF/17fChNpFXixDxCYUVcaYYeAT8pODy0UAYlBEIs9fwLJbearnFQLj /6c2NVvXO8Pig5MM0qBAdgT7Q9x2rh1J3d+O2vq+TgDeO1Q6jTtJ7DQg+pbLTMW4b8EP yriQ== X-Gm-Message-State: AOAM530AYZnZYMubd4/sJgoj6NO6SHD2zAmzBDRdZ2cD/ChawxkcNPQQ iJbpWbRBzYNM0WWHxmwGwsGM1+msnsg= X-Google-Smtp-Source: ABdhPJwO6oV98Cw10pf4iwCjvfN1YjTooztJelPVUYyqXCFxyBU4A6xzqbvh7xNdi0J6YCw/eQhNUQ== X-Received: by 2002:ac2:4bc1:: with SMTP id o1mr4016947lfq.260.1633182431831; Sat, 02 Oct 2021 06:47:11 -0700 (PDT) Received: from localhost.localdomain ([88.201.161.72]) by smtp.gmail.com with ESMTPSA id e5sm952648ljj.129.2021.10.02.06.47.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Oct 2021 06:47:11 -0700 (PDT) From: Oleg Pykhalov Date: Sat, 2 Oct 2021 16:45:53 +0300 Message-Id: <20211002134603.6229-2-go.wigust@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211002134603.6229-1-go.wigust@gmail.com> References: <20211002134603.6229-1-go.wigust@gmail.com> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/home-services/configuration.scm: Move the content ... * gnu/services/configuration.scm: ... here. * gnu/local.mk (GNU_SYSTEM_MODULES): Delete gnu/home-services/configuration. * gnu/home-services/shells.scm: Replace (gnu home-services configuration) with (gnu services configuration). * gnu/home-services/xdg.scm: Same. --- gnu/home-services/configuration.scm | 109 ---------------------------- gnu/home-services/shells.scm | 2 +- gnu/home-services/xdg.scm | 2 +- gnu/local.mk | 1 - gnu/services/configuration.scm | 89 ++++++++++++++++++++++- 5 files changed, 89 insertions(+), 114 deletions(-) delete mode 100644 gnu/home-services/configuration.scm diff --git a/gnu/home-services/configuration.scm b/gnu/home-services/configuration.scm deleted file mode 100644 index e8f4bc77ec..0000000000 --- a/gnu/home-services/configuration.scm +++ /dev/null @@ -1,109 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2021 Andrew Tropin -;;; Copyright © 2021 Xinglu Chen -;;; -;;; This file is part of GNU Guix. -;;; -;;; GNU Guix is free software; you can redistribute it and/or modify it -;;; under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 3 of the License, or (at -;;; your option) any later version. -;;; -;;; GNU Guix is distributed in the hope that it will be useful, but -;;; WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Guix. If not, see . - -(define-module (gnu home-services configuration) - #:use-module (gnu services configuration) - #:use-module (guix gexp) - #:use-module (srfi srfi-1) - #:use-module (ice-9 curried-definitions) - #:use-module (ice-9 match) - #:use-module (guix i18n) - #:use-module (guix diagnostics) - - #:export (filter-configuration-fields - - interpose - list-of - - list-of-strings? - alist? - string-or-gexp? - serialize-string-or-gexp - text-config? - serialize-text-config - generic-serialize-alist-entry - generic-serialize-alist)) - -(define* (filter-configuration-fields configuration-fields fields - #:optional negate?) - "Retrieve the fields listed in FIELDS from CONFIGURATION-FIELDS. -If NEGATE? is @code{#t}, retrieve all fields except FIELDS." - (filter (lambda (field) - (let ((member? (member (configuration-field-name field) fields))) - (if (not negate?) member? (not member?)))) - configuration-fields)) - - -(define* (interpose ls #:optional (delimiter "\n") (grammar 'infix)) - "Same as @code{string-join}, but without join and string, returns an -DELIMITER interposed LS. Support 'infix and 'suffix GRAMMAR values." - (when (not (member grammar '(infix suffix))) - (raise - (formatted-message - (G_ "The GRAMMAR value must be 'infix or 'suffix, but ~a provided.") - grammar))) - (fold-right (lambda (e acc) - (cons e - (if (and (null? acc) (eq? grammar 'infix)) - acc - (cons delimiter acc)))) - '() ls)) - -(define (list-of pred?) - "Return a procedure that takes a list and check if all the elements of -the list result in @code{#t} when applying PRED? on them." - (lambda (x) - (if (list? x) - (every pred? x) - #f))) - - -(define list-of-strings? - (list-of string?)) - -(define alist? list?) - -(define (string-or-gexp? sg) (or (string? sg) (gexp? sg))) -(define (serialize-string-or-gexp field-name val) "") - -(define (text-config? config) - (and (list? config) (every string-or-gexp? config))) -(define (serialize-text-config field-name val) - #~(string-append #$@(interpose val "\n" 'suffix))) - -(define ((generic-serialize-alist-entry serialize-field) entry) - "Apply the SERIALIZE-FIELD procedure on the field and value of ENTRY." - (match entry - ((field . val) (serialize-field field val)))) - -(define (generic-serialize-alist combine serialize-field fields) - "Generate a configuration from an association list FIELDS. - -SERIALIZE-FIELD is a procedure that takes two arguments, it will be -applied on the fields and values of FIELDS using the -@code{generic-serialize-alist-entry} procedure. - -COMBINE is a procedure that takes one or more arguments and combines -all the alist entries into one value, @code{string-append} or -@code{append} are usually good candidates for this. - -See the @code{serialize-alist} procedure in `@code{(gnu home-services -version-control}' for an example usage.)}" - (apply combine - (map (generic-serialize-alist-entry serialize-field) fields))) diff --git a/gnu/home-services/shells.scm b/gnu/home-services/shells.scm index ecb02098f7..f9057cc8a2 100644 --- a/gnu/home-services/shells.scm +++ b/gnu/home-services/shells.scm @@ -19,7 +19,7 @@ (define-module (gnu home-services shells) #:use-module (gnu services configuration) - #:use-module (gnu home-services configuration) + #:use-module (gnu services configuration) #:use-module (gnu home-services utils) #:use-module (gnu home-services) #:use-module (gnu packages shells) diff --git a/gnu/home-services/xdg.scm b/gnu/home-services/xdg.scm index 94275f3b65..efc1870c28 100644 --- a/gnu/home-services/xdg.scm +++ b/gnu/home-services/xdg.scm @@ -19,7 +19,7 @@ (define-module (gnu home-services xdg) #:use-module (gnu services configuration) - #:use-module (gnu home-services configuration) + #:use-module (gnu services configuration) #:use-module (gnu home-services) #:use-module (gnu packages freedesktop) #:use-module (gnu home-services utils) diff --git a/gnu/local.mk b/gnu/local.mk index d415b892e9..0e1ff9f462 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -77,7 +77,6 @@ GNU_SYSTEM_MODULES = \ %D%/home-services.scm \ %D%/home-services/symlink-manager.scm \ %D%/home-services/fontutils.scm \ - %D%/home-services/configuration.scm \ %D%/home-services/shells.scm \ %D%/home-services/shepherd.scm \ %D%/home-services/mcron.scm \ diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm index df3d3b6f9b..54e5cd1a79 100644 --- a/gnu/services/configuration.scm +++ b/gnu/services/configuration.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2017, 2018 Clément Lassieur ;;; Copyright © 2021 Xinglu Chen ;;; Copyright © 2021 Maxim Cournoyer +;;; Copyright © 2021 Andrew Tropin ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,10 +26,12 @@ #:use-module (guix records) #:use-module (guix gexp) #:use-module ((guix utils) #:select (source-properties->location)) - #:use-module ((guix diagnostics) #:select (location-file)) + #:use-module ((guix diagnostics) #:select (formatted-message location-file)) #:use-module ((guix modules) #:select (file-name->module-name)) + #:use-module (guix i18n) #:autoload (texinfo) (texi-fragment->stexi) #:autoload (texinfo serialize) (stexi->texi) + #:use-module (ice-9 curried-definitions) #:use-module (ice-9 match) #:use-module (srfi srfi-1) #:use-module (srfi srfi-34) @@ -56,7 +59,21 @@ generate-documentation configuration->documentation empty-serializer - serialize-package)) + serialize-package + + filter-configuration-fields + + interpose + list-of + + list-of-strings? + alist? + string-or-gexp? + serialize-string-or-gexp + text-config? + serialize-text-config + generic-serialize-alist-entry + generic-serialize-alist)) ;;; Commentary: ;;; @@ -323,3 +340,71 @@ Texinfo documentation of its fields." '-fields)))) (display (generate-documentation `((,configuration-symbol ,fields-getter)) configuration-symbol)))) + +(define* (filter-configuration-fields configuration-fields fields + #:optional negate?) + "Retrieve the fields listed in FIELDS from CONFIGURATION-FIELDS. +If NEGATE? is @code{#t}, retrieve all fields except FIELDS." + (filter (lambda (field) + (let ((member? (member (configuration-field-name field) fields))) + (if (not negate?) member? (not member?)))) + configuration-fields)) + + +(define* (interpose ls #:optional (delimiter "\n") (grammar 'infix)) + "Same as @code{string-join}, but without join and string, returns an +DELIMITER interposed LS. Support 'infix and 'suffix GRAMMAR values." + (when (not (member grammar '(infix suffix))) + (raise + (formatted-message + (G_ "The GRAMMAR value must be 'infix or 'suffix, but ~a provided.") + grammar))) + (fold-right (lambda (e acc) + (cons e + (if (and (null? acc) (eq? grammar 'infix)) + acc + (cons delimiter acc)))) + '() ls)) + +(define (list-of pred?) + "Return a procedure that takes a list and check if all the elements of +the list result in @code{#t} when applying PRED? on them." + (lambda (x) + (if (list? x) + (every pred? x) + #f))) + + +(define list-of-strings? + (list-of string?)) + +(define alist? list?) + +(define (string-or-gexp? sg) (or (string? sg) (gexp? sg))) +(define (serialize-string-or-gexp field-name val) "") + +(define (text-config? config) + (and (list? config) (every string-or-gexp? config))) +(define (serialize-text-config field-name val) + #~(string-append #$@(interpose val "\n" 'suffix))) + +(define ((generic-serialize-alist-entry serialize-field) entry) + "Apply the SERIALIZE-FIELD procedure on the field and value of ENTRY." + (match entry + ((field . val) (serialize-field field val)))) + +(define (generic-serialize-alist combine serialize-field fields) + "Generate a configuration from an association list FIELDS. + +SERIALIZE-FIELD is a procedure that takes two arguments, it will be +applied on the fields and values of FIELDS using the +@code{generic-serialize-alist-entry} procedure. + +COMBINE is a procedure that takes one or more arguments and combines +all the alist entries into one value, @code{string-append} or +@code{append} are usually good candidates for this. + +See the @code{serialize-alist} procedure in `@code{(gnu home-services +version-control}' for an example usage.)}" + (apply combine + (map (generic-serialize-alist-entry serialize-field) fields))) From patchwork Sat Oct 2 13:45:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleg Pykhalov X-Patchwork-Id: 33556 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 67F4E27BBE3; Sat, 2 Oct 2021 14:49:04 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2E48C27BBE1 for ; Sat, 2 Oct 2021 14:49:04 +0100 (BST) Received: from localhost ([::1]:54408 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWfNv-000105-Am for patchwork@mira.cbaines.net; Sat, 02 Oct 2021 09:49:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41182) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWfMw-00080Z-S5 for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46817) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWfMw-0002nK-KH for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mWfMw-0002um-IE for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50967] [PATCH 03/12] gnu: home-services: Move symlink-manager to (gnu services). Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 02 Oct 2021 13:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50967 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50967@debbugs.gnu.org Cc: Oleg Pykhalov Received: via spool by 50967-submit@debbugs.gnu.org id=B50967.163318244911004 (code B ref 50967); Sat, 02 Oct 2021 13:48:02 +0000 Received: (at 50967) by debbugs.gnu.org; 2 Oct 2021 13:47:29 +0000 Received: from localhost ([127.0.0.1]:58342 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWfMO-0002rH-WC for submit@debbugs.gnu.org; Sat, 02 Oct 2021 09:47:29 -0400 Received: from mail-lf1-f47.google.com ([209.85.167.47]:44574) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWfME-0002pG-CX for 50967@debbugs.gnu.org; Sat, 02 Oct 2021 09:47:19 -0400 Received: by mail-lf1-f47.google.com with SMTP id y26so50578693lfa.11 for <50967@debbugs.gnu.org>; Sat, 02 Oct 2021 06:47:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aYh+NTpZkd+oMKvCIM/ThxYETIehbMSWyMirwTP3Hvg=; b=OEE3BxYymo3psHcinPUb3WP/7NTPWac0Hsv0wrA8pqpPAMShoTC+wbBveWDz9qjIu1 iZEMvq6snbDwAfcBlbiKWbRUlgGUTxI5CogKeDrojYsyMtj44h45N+WvWksyQOfV2wQx mFFarEibOG9CB5mLGy8PyI24mFMSjTrjJmVq/eFFaMv/xsRnpp9L327o/CGeVt7gTxSj WgZzQfBblfJdHH0X8LOQdt/lVnY3XnH0xPxAzc323qWImHu5gBAId444dwYItlq6BR9R BoOJrjCCCVVu0f51/OjxjKEQRY84IdTiRKPB/RQDL68SjUBRVKM/+mqFwPzUXkbLzJUx GYrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aYh+NTpZkd+oMKvCIM/ThxYETIehbMSWyMirwTP3Hvg=; b=thi1aHuvFjjEuPLpQTfRlPvWV86C6whpH0FkLbu3KNjyIMOUkoDOrGFUf0bWLkP9kS Lw9tdOGG21NwoFTXffr+7313z5SscGbjpNuceb2oYhVW2eY6VsRC16kXrQFLAGEku1lm wEVJh7xnqo5RK/PDu1USp3YtMU0Ag5VQwD9kMYrv5j+TLyYPYD0w/efig0Ou+mEYM6Iw NBc2Dsmic0j6zr9BXxrl0Ou4ff1kYsrOMmXG5cxAL0K7zeuozKLw2kuhHf1u47rgfgIR PKiUknVtYw5tjV6gFe63nTxKIxXGfzoAhtjb/C/5eqWqBp1wRsmRN/Stv+CglivEt2z0 eKQg== X-Gm-Message-State: AOAM533+2GLxoEbJH+NTrBk4Pakbxl7wSoeJXmu2v6DNjglzl1j/NbpE T+tfqdZqZWvcRJ121/igAsiT/rC2JJ8= X-Google-Smtp-Source: ABdhPJyP+GAx88dRDA5HsO0JCym4aKC+4ybcXCNtYWl+03cbOAzMark/pA9Jy+iRIH0xsZqfUN8O7g== X-Received: by 2002:a19:9102:: with SMTP id t2mr3904309lfd.346.1633182432385; Sat, 02 Oct 2021 06:47:12 -0700 (PDT) Received: from localhost.localdomain ([88.201.161.72]) by smtp.gmail.com with ESMTPSA id e5sm952648ljj.129.2021.10.02.06.47.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Oct 2021 06:47:12 -0700 (PDT) From: Oleg Pykhalov Date: Sat, 2 Oct 2021 16:45:54 +0300 Message-Id: <20211002134603.6229-3-go.wigust@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211002134603.6229-1-go.wigust@gmail.com> References: <20211002134603.6229-1-go.wigust@gmail.com> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/home-services/symlink-manager.scm: Rename to gnu/services/symlink-manager.scm. * gnu/local.mk: Same. * gnu/home.scm: Replace (gnu home-services symlink-manager) with (gnu services symlink-manager). --- gnu/home.scm | 2 +- gnu/local.mk | 2 +- gnu/{home-services => services}/symlink-manager.scm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename gnu/{home-services => services}/symlink-manager.scm (99%) diff --git a/gnu/home.scm b/gnu/home.scm index f4c9359e25..9a25a20b6c 100644 --- a/gnu/home.scm +++ b/gnu/home.scm @@ -18,7 +18,7 @@ (define-module (gnu home) #:use-module (gnu home-services) - #:use-module (gnu home-services symlink-manager) + #:use-module (gnu services symlink-manager) #:use-module (gnu home-services shells) #:use-module (gnu home-services xdg) #:use-module (gnu home-services fontutils) diff --git a/gnu/local.mk b/gnu/local.mk index 0e1ff9f462..1c30763ff2 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -75,7 +75,6 @@ GNU_SYSTEM_MODULES = \ %D%/ci.scm \ %D%/home.scm \ %D%/home-services.scm \ - %D%/home-services/symlink-manager.scm \ %D%/home-services/fontutils.scm \ %D%/home-services/shells.scm \ %D%/home-services/shepherd.scm \ @@ -660,6 +659,7 @@ GNU_SYSTEM_MODULES = \ %D%/services/spice.scm \ %D%/services/ssh.scm \ %D%/services/syncthing.scm \ + %D%/services/symlink-manager.scm \ %D%/services/sysctl.scm \ %D%/services/telephony.scm \ %D%/services/version-control.scm \ diff --git a/gnu/home-services/symlink-manager.scm b/gnu/services/symlink-manager.scm similarity index 99% rename from gnu/home-services/symlink-manager.scm rename to gnu/services/symlink-manager.scm index 11f5d503d4..84adec8d44 100644 --- a/gnu/home-services/symlink-manager.scm +++ b/gnu/services/symlink-manager.scm @@ -17,7 +17,7 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (gnu home-services symlink-manager) +(define-module (gnu services symlink-manager) #:use-module (gnu home-services) #:use-module (guix gexp) From patchwork Sat Oct 2 13:45:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleg Pykhalov X-Patchwork-Id: 33564 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 CB3D727BBE3; Sat, 2 Oct 2021 14:50:30 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5BBF827BBE1 for ; Sat, 2 Oct 2021 14:50:30 +0100 (BST) Received: from localhost ([::1]:58016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWfPJ-0003QT-F9 for patchwork@mira.cbaines.net; Sat, 02 Oct 2021 09:50:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWfMx-00082w-Nr for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46819) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWfMx-0002no-Eq for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mWfMx-0002v1-DB for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50967] [PATCH 04/12] gnu: home-services: Move utils to (gnu services). Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 02 Oct 2021 13:48:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50967 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50967@debbugs.gnu.org Cc: Oleg Pykhalov Received: via spool by 50967-submit@debbugs.gnu.org id=B50967.163318245011025 (code B ref 50967); Sat, 02 Oct 2021 13:48:03 +0000 Received: (at 50967) by debbugs.gnu.org; 2 Oct 2021 13:47:30 +0000 Received: from localhost ([127.0.0.1]:58346 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWfMQ-0002rc-4Z for submit@debbugs.gnu.org; Sat, 02 Oct 2021 09:47:30 -0400 Received: from mail-lf1-f45.google.com ([209.85.167.45]:45902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWfMF-0002pI-0L for 50967@debbugs.gnu.org; Sat, 02 Oct 2021 09:47:19 -0400 Received: by mail-lf1-f45.google.com with SMTP id u18so50572068lfd.12 for <50967@debbugs.gnu.org>; Sat, 02 Oct 2021 06:47:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=B0BZuOp1+zEc34VOYnBZH0N108bic6Jao9auDDQScU8=; b=FzofpHvAyKbARw3mhhI0cMETs821c1jbIAdOkfyho77OPf9OZ0jp5RF5gDvaocnJSu iineIpbIEmhMYPLj72cLX3U6b6rtViF9ZNSgAYMoBk3bMGj1VnDWmy/JPcFyBFKDLnOT ZXmOCEvugHesWHKaNoKkJXykv92fjJlx101lC3hE5gLX60QGDGuTdtwW0y1CxF8O8Aaw /AZKgR80G7HLv6FyXWZa4+pq7/oXrJWQfjwkui5MirZo1+fNJys/F7i5n7xidZtIhdc/ FilLOUSsRDUwcxvHwORc/eteskkH0JGm9FbQ2KcDVVojRGML3i4h9h43GlOPyQEkJSuU c97g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=B0BZuOp1+zEc34VOYnBZH0N108bic6Jao9auDDQScU8=; b=tFNrMG9misagAb2A8HJ36qi5VG3KlvoySFf4cE6iMyU4BYExLfoBpuvRbAZQFztQR0 4QK5MNFCy74uWYV9dRdSJH3/K5+rxDDFvcNobfMhrZtSIfNc+jlRSUF9gvI3ewfZY6cI s2ia8/S6vTE7rmaaUEUh7KiFuGhOKrPXJ7AmZlRSJfPGR8DAlG15tCi7ICDQHo2+8A8T DfHvlW4+vJzDfjG3n0wcBmGQl/gpaXTzy/IrHKbv6YfA8EVqUsDZPhk5uE3lldHHMlyl cHs3A9XEq/nXje9vy3zBYaP0klm23n3F+btZzF6SKXaLnoSVKWDGtVWMMUDtCH3dLb+i mTXA== X-Gm-Message-State: AOAM532PHkOyq7efOgNG2v3Xf4gtYSXEdfMti5fkMMY9geeURWPa4Z48 yE8YSwOolErKeyqzLUjcv729K0jc+ZY= X-Google-Smtp-Source: ABdhPJx0lvCYQQppWPYj3LH2TyHomgMvb4JJk+ZWLCBiD6UYH3P4R0Z+FhZoYhefqIqGOhPn7ghREg== X-Received: by 2002:a05:6512:3995:: with SMTP id j21mr3667608lfu.452.1633182432974; Sat, 02 Oct 2021 06:47:12 -0700 (PDT) Received: from localhost.localdomain ([88.201.161.72]) by smtp.gmail.com with ESMTPSA id e5sm952648ljj.129.2021.10.02.06.47.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Oct 2021 06:47:12 -0700 (PDT) From: Oleg Pykhalov Date: Sat, 2 Oct 2021 16:45:55 +0300 Message-Id: <20211002134603.6229-4-go.wigust@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211002134603.6229-1-go.wigust@gmail.com> References: <20211002134603.6229-1-go.wigust@gmail.com> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/home-services/utils.scm: Rename to gnu/services/utils.scm. * gnu/local.mk: Same. * gnu/home-services/shells.scm: Replace (gnu home-services utils) with (gnu services utils) * gnu/home-services/xdg.scm: Same. --- gnu/home-services/shells.scm | 2 +- gnu/home-services/xdg.scm | 2 +- gnu/local.mk | 2 +- gnu/{home-services => services}/utils.scm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename gnu/{home-services => services}/utils.scm (98%) diff --git a/gnu/home-services/shells.scm b/gnu/home-services/shells.scm index f9057cc8a2..377ff74542 100644 --- a/gnu/home-services/shells.scm +++ b/gnu/home-services/shells.scm @@ -20,7 +20,7 @@ (define-module (gnu home-services shells) #:use-module (gnu services configuration) #:use-module (gnu services configuration) - #:use-module (gnu home-services utils) + #:use-module (gnu services utils) #:use-module (gnu home-services) #:use-module (gnu packages shells) #:use-module (gnu packages bash) diff --git a/gnu/home-services/xdg.scm b/gnu/home-services/xdg.scm index efc1870c28..183bca630c 100644 --- a/gnu/home-services/xdg.scm +++ b/gnu/home-services/xdg.scm @@ -22,7 +22,7 @@ #:use-module (gnu services configuration) #:use-module (gnu home-services) #:use-module (gnu packages freedesktop) - #:use-module (gnu home-services utils) + #:use-module (gnu services utils) #:use-module (guix gexp) #:use-module (guix records) #:use-module (guix i18n) diff --git a/gnu/local.mk b/gnu/local.mk index 1c30763ff2..50f5e58fbc 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -79,7 +79,6 @@ GNU_SYSTEM_MODULES = \ %D%/home-services/shells.scm \ %D%/home-services/shepherd.scm \ %D%/home-services/mcron.scm \ - %D%/home-services/utils.scm \ %D%/home-services/xdg.scm \ %D%/image.scm \ %D%/packages.scm \ @@ -664,6 +663,7 @@ GNU_SYSTEM_MODULES = \ %D%/services/telephony.scm \ %D%/services/version-control.scm \ %D%/services/vpn.scm \ + %D%/services/utils.scm \ %D%/services/web.scm \ %D%/services/xorg.scm \ \ diff --git a/gnu/home-services/utils.scm b/gnu/services/utils.scm similarity index 98% rename from gnu/home-services/utils.scm rename to gnu/services/utils.scm index f13133a7ae..b95f2395c4 100644 --- a/gnu/home-services/utils.scm +++ b/gnu/services/utils.scm @@ -17,7 +17,7 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (gnu home-services utils) +(define-module (gnu services utils) #:use-module (ice-9 string-fun) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) From patchwork Sat Oct 2 13:45:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleg Pykhalov X-Patchwork-Id: 33558 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 D00A527BBE3; Sat, 2 Oct 2021 14:49:17 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 2A1DE27BBE1 for ; Sat, 2 Oct 2021 14:49:17 +0100 (BST) Received: from localhost ([::1]:55254 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWfO8-0001YU-5D for patchwork@mira.cbaines.net; Sat, 02 Oct 2021 09:49:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41188) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWfMy-00084C-3c for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46820) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWfMx-0002oC-R4 for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mWfMx-0002v8-Pe for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50967] [PATCH 05/12] gnu: home-services: Move fontutils to (gnu services). Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 02 Oct 2021 13:48:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50967 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50967@debbugs.gnu.org Cc: Oleg Pykhalov Received: via spool by 50967-submit@debbugs.gnu.org id=B50967.163318245111034 (code B ref 50967); Sat, 02 Oct 2021 13:48:03 +0000 Received: (at 50967) by debbugs.gnu.org; 2 Oct 2021 13:47:31 +0000 Received: from localhost ([127.0.0.1]:58348 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWfMQ-0002rm-JP for submit@debbugs.gnu.org; Sat, 02 Oct 2021 09:47:30 -0400 Received: from mail-lf1-f47.google.com ([209.85.167.47]:42628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWfMF-0002pJ-JL for 50967@debbugs.gnu.org; Sat, 02 Oct 2021 09:47:20 -0400 Received: by mail-lf1-f47.google.com with SMTP id x27so49901014lfa.9 for <50967@debbugs.gnu.org>; Sat, 02 Oct 2021 06:47:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jDziKfo2YnNJdqfdMbHqm4PvRoHTSmzxCekUE2Bu7O8=; b=daVHGGQWBXkhWlmlFBxfGzXAzojR+F1LT3XXCWDGGjZ/j9BhW/t5iTh/64rJ68+b0J Yv7D0FO1hMrsd3+jv585FcK8DkTzu8g9J4/lkpV3ZYjkZkUfUsazk1W5FkjyGD5QhZ0h rYt3ZPycVasCCsFo82fv41SpBsUPXCwDbQuKsXGVb0p/MXP+fO5XV/ZgJdKsG7c/LXap cW8G7hKOj7ThnKWF2CR2SisDX5pZ9xqTg0I7TQwBP/sBiJ1pvs9qn07ftBSbjL2zSclB kSux2QMGS8OrxpGQhyLoqbkDHr3sdMmawUX1WSJYC5uX/MFgOLjUyTSMwNuZQpKGMqTP LNsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jDziKfo2YnNJdqfdMbHqm4PvRoHTSmzxCekUE2Bu7O8=; b=pnstMNMA3v0+QvAZxZkSogIW7pX1ZRz6X2mUD+OJ7Wi+JeozNj3MWn60PpD0PP4v7c mzNW8lUiemee7Z1mX4Dmru73S3zAtuHsk433xQqToRQRy11cOKbj/pisfX8h8sWH+Ldl rUYNtZ2p1DsBFhH7hI8/qvhi8edic2EHBdd9aXMYXUyI900pRdXr1BGEUIlOwdUibVBa y/BrQAoMTuqgxTiBYWnKEfQmqiyYGCqff/t9Df93iJcKlQydikzaTesnqES/O0/ObCWk 6eZNsABNOfSiJNDybNDWAlYMbScogH39X9WXxNDC6bptRX4nie9dshRaHZh+okzzNEly TJBA== X-Gm-Message-State: AOAM532Uk+5L8IEnSOyRhSoU9Yd9ib4JCUdTj/R3kXVwgomiGvnyA4Wi VkSRcelxBOBNl4dVA3nB/hRCh3OROXM= X-Google-Smtp-Source: ABdhPJyRevaSGmEI4jqcTv54VLB3t3ezYvUMCGVQ21PWwZBTs5f2aytPFKghP16MA2S3jcI/tiNDdA== X-Received: by 2002:a05:6512:34c6:: with SMTP id w6mr3407260lfr.70.1633182433625; Sat, 02 Oct 2021 06:47:13 -0700 (PDT) Received: from localhost.localdomain ([88.201.161.72]) by smtp.gmail.com with ESMTPSA id e5sm952648ljj.129.2021.10.02.06.47.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Oct 2021 06:47:13 -0700 (PDT) From: Oleg Pykhalov Date: Sat, 2 Oct 2021 16:45:56 +0300 Message-Id: <20211002134603.6229-5-go.wigust@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211002134603.6229-1-go.wigust@gmail.com> References: <20211002134603.6229-1-go.wigust@gmail.com> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/home-services/fontutils.scm: Rename to gnu/services/fontutils.scm. * gnu/local.mk: Same. * gnu/home.scm: Replace (gnu home-services fontutils) with (gnu services fontutils). --- gnu/home.scm | 2 +- gnu/local.mk | 2 +- gnu/{home-services => services}/fontutils.scm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename gnu/{home-services => services}/fontutils.scm (98%) diff --git a/gnu/home.scm b/gnu/home.scm index 9a25a20b6c..352f19ea06 100644 --- a/gnu/home.scm +++ b/gnu/home.scm @@ -21,7 +21,7 @@ #:use-module (gnu services symlink-manager) #:use-module (gnu home-services shells) #:use-module (gnu home-services xdg) - #:use-module (gnu home-services fontutils) + #:use-module (gnu services fontutils) #:use-module (gnu services) #:use-module (guix records) #:use-module (guix diagnostics) diff --git a/gnu/local.mk b/gnu/local.mk index 50f5e58fbc..5df35435e7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -75,7 +75,6 @@ GNU_SYSTEM_MODULES = \ %D%/ci.scm \ %D%/home.scm \ %D%/home-services.scm \ - %D%/home-services/fontutils.scm \ %D%/home-services/shells.scm \ %D%/home-services/shepherd.scm \ %D%/home-services/mcron.scm \ @@ -630,6 +629,7 @@ GNU_SYSTEM_MODULES = \ %D%/services/docker.scm \ %D%/services/authentication.scm \ %D%/services/file-sharing.scm \ + %D%/services/fontutils.scm \ %D%/services/games.scm \ %D%/services/ganeti.scm \ %D%/services/getmail.scm \ diff --git a/gnu/home-services/fontutils.scm b/gnu/services/fontutils.scm similarity index 98% rename from gnu/home-services/fontutils.scm rename to gnu/services/fontutils.scm index 28bfc3d3f7..82c6048bb4 100644 --- a/gnu/home-services/fontutils.scm +++ b/gnu/services/fontutils.scm @@ -17,7 +17,7 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (gnu home-services fontutils) +(define-module (gnu services fontutils) #:use-module (gnu home-services) #:use-module (gnu packages fontutils) #:use-module (guix gexp) From patchwork Sat Oct 2 13:45:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleg Pykhalov X-Patchwork-Id: 33559 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 C2B4B27BBE3; Sat, 2 Oct 2021 14:49:23 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 856E127BBE1 for ; Sat, 2 Oct 2021 14:49:23 +0100 (BST) Received: from localhost ([::1]:55666 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWfOE-0001pg-Le for patchwork@mira.cbaines.net; Sat, 02 Oct 2021 09:49:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWfMy-00085J-Fv for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46821) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWfMy-0002od-7I for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mWfMy-0002vG-5g for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50967] [PATCH 06/12] gnu: home-services: Move shells to (gnu services). Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 02 Oct 2021 13:48:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50967 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50967@debbugs.gnu.org Cc: Oleg Pykhalov Received: via spool by 50967-submit@debbugs.gnu.org id=B50967.163318245411068 (code B ref 50967); Sat, 02 Oct 2021 13:48:04 +0000 Received: (at 50967) by debbugs.gnu.org; 2 Oct 2021 13:47:34 +0000 Received: from localhost ([127.0.0.1]:58350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWfMQ-0002rv-TF for submit@debbugs.gnu.org; Sat, 02 Oct 2021 09:47:34 -0400 Received: from mail-lf1-f50.google.com ([209.85.167.50]:46799) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWfMG-0002pL-Hq for 50967@debbugs.gnu.org; Sat, 02 Oct 2021 09:47:21 -0400 Received: by mail-lf1-f50.google.com with SMTP id i24so2048203lfj.13 for <50967@debbugs.gnu.org>; Sat, 02 Oct 2021 06:47:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=D3MQrEJLvlPDN/GN81TOc6EJB/hUlt7K00yO9/4bHMk=; b=ewOjqk6Td5izoByPr4G6iFQn3rByJS4kozzQ2j5AKEZfFiW9O8kcS4Ab41tc/Uo8aD 9VmltNP2mkCq2LvSrE+PYR4R+iALFW74oXmvU5msfOfvkSauAUDMvrh9W87IVIRnV47V rNAbefyz81rx/kBxslZOp3USucjs8vf4tDBdCGBFOrSJKhQu3vqtahyiTBCR27Pgk1Lo BiDP0kmc6eRUH9RT1EfArDcYwhTB8rfcDFhL4u+sEmQASmlnoISrjqjr1FrRbR0MyK5O Hqx1Nq4/zVPg5i2dx6Kh6Z31l71DHAU9fHK5NLzU6QGGIGRrnKWhl0SQ0njwpcq5elYI R8XA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=D3MQrEJLvlPDN/GN81TOc6EJB/hUlt7K00yO9/4bHMk=; b=c5Divj6RwySbBrUnfiQbyavP8D75M3NMMS2WA04I0D5SgumWFCyOfTX7oTUsqDEAUP EHIRraGCr8fWpl87HO0049pRLRbgb2Nq0RX1FQ+LNMueJ9KNfjiimk3WR9mAb2VE5yV+ pvwVyEPBHj8SH/0fWSBRPOsc8ELlE10cBzBp7TJ8MmhR6JZVwUX/K4wG58i/dOsgWpSX kXM/UW96awAC5Rwkl5kyF8QW8tAvk439oYAk3qZ8/hy8cWJZ2iAIMPF0s+ifUgWvjgMp 0HfWmVgxI1rcP9QYn2UhYVmH7+JmsO0D9ofdgq36sOwTkzCEnwvm0fAi6AFYMd04S2IC vQ0Q== X-Gm-Message-State: AOAM5315mQ/RYn3W1+QVoKSRYKrHcOHn7sW74lqh9+6IAzlEp6tYmue2 9QnNZjEwoSHRktWAY1JKKnywT1+p6Wc= X-Google-Smtp-Source: ABdhPJwRo4N/NnqyPTZwe3LrUxIHzsBxFTrEmZg6PmFNTDeeptmef/waxUyatni4tAdfqUULFFB+qw== X-Received: by 2002:a19:490d:: with SMTP id w13mr3918971lfa.30.1633182434201; Sat, 02 Oct 2021 06:47:14 -0700 (PDT) Received: from localhost.localdomain ([88.201.161.72]) by smtp.gmail.com with ESMTPSA id e5sm952648ljj.129.2021.10.02.06.47.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Oct 2021 06:47:13 -0700 (PDT) From: Oleg Pykhalov Date: Sat, 2 Oct 2021 16:45:57 +0300 Message-Id: <20211002134603.6229-6-go.wigust@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211002134603.6229-1-go.wigust@gmail.com> References: <20211002134603.6229-1-go.wigust@gmail.com> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/home-services/shells.scm: Rename to gnu/services/shells.scm. * gnu/local.mk: Same. * gnu/home.scm: Replace (gnu home-services shells) with (gnu services shells). * doc/he-config-bare-bones.scm: Same. --- doc/he-config-bare-bones.scm | 2 +- gnu/home.scm | 2 +- gnu/local.mk | 2 +- gnu/{home-services => services}/shells.scm | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename gnu/{home-services => services}/shells.scm (99%) diff --git a/doc/he-config-bare-bones.scm b/doc/he-config-bare-bones.scm index 01be46a7b0..c6c5866a17 100644 --- a/doc/he-config-bare-bones.scm +++ b/doc/he-config-bare-bones.scm @@ -1,6 +1,6 @@ (use-modules (gnu home) (gnu home-services) - (gnu home-services shells) + (gnu services shells) (gnu services) (gnu packages admin) (guix gexp)) diff --git a/gnu/home.scm b/gnu/home.scm index 352f19ea06..a36b41daf9 100644 --- a/gnu/home.scm +++ b/gnu/home.scm @@ -19,7 +19,7 @@ (define-module (gnu home) #:use-module (gnu home-services) #:use-module (gnu services symlink-manager) - #:use-module (gnu home-services shells) + #:use-module (gnu services shells) #:use-module (gnu home-services xdg) #:use-module (gnu services fontutils) #:use-module (gnu services) diff --git a/gnu/local.mk b/gnu/local.mk index 5df35435e7..c549a96966 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -75,7 +75,6 @@ GNU_SYSTEM_MODULES = \ %D%/ci.scm \ %D%/home.scm \ %D%/home-services.scm \ - %D%/home-services/shells.scm \ %D%/home-services/shepherd.scm \ %D%/home-services/mcron.scm \ %D%/home-services/xdg.scm \ @@ -655,6 +654,7 @@ GNU_SYSTEM_MODULES = \ %D%/services/pm.scm \ %D%/services/rsync.scm \ %D%/services/sddm.scm \ + %D%/services/shells.scm \ %D%/services/spice.scm \ %D%/services/ssh.scm \ %D%/services/syncthing.scm \ diff --git a/gnu/home-services/shells.scm b/gnu/services/shells.scm similarity index 99% rename from gnu/home-services/shells.scm rename to gnu/services/shells.scm index 377ff74542..1e51fa99df 100644 --- a/gnu/home-services/shells.scm +++ b/gnu/services/shells.scm @@ -17,7 +17,7 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (gnu home-services shells) +(define-module (gnu services shells) #:use-module (gnu services configuration) #:use-module (gnu services configuration) #:use-module (gnu services utils) From patchwork Sat Oct 2 13:45:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleg Pykhalov X-Patchwork-Id: 33565 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 EC13227BBE3; Sat, 2 Oct 2021 14:51:00 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5B0BF27BBE1 for ; Sat, 2 Oct 2021 14:51:00 +0100 (BST) Received: from localhost ([::1]:58430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWfPn-0003j3-EV for patchwork@mira.cbaines.net; Sat, 02 Oct 2021 09:50:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41192) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWfMy-00086j-Sy for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46822) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWfMy-0002oy-Kq for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mWfMy-0002vN-Iw for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50967] [PATCH 07/12] gnu: home-services: Move xdg to (gnu services). Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 02 Oct 2021 13:48:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50967 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50967@debbugs.gnu.org Cc: Oleg Pykhalov Received: via spool by 50967-submit@debbugs.gnu.org id=B50967.163318245511078 (code B ref 50967); Sat, 02 Oct 2021 13:48:04 +0000 Received: (at 50967) by debbugs.gnu.org; 2 Oct 2021 13:47:35 +0000 Received: from localhost ([127.0.0.1]:58352 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWfMU-0002sT-It for submit@debbugs.gnu.org; Sat, 02 Oct 2021 09:47:34 -0400 Received: from mail-lf1-f42.google.com ([209.85.167.42]:43827) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWfMG-0002pM-PQ for 50967@debbugs.gnu.org; Sat, 02 Oct 2021 09:47:21 -0400 Received: by mail-lf1-f42.google.com with SMTP id e15so50340102lfr.10 for <50967@debbugs.gnu.org>; Sat, 02 Oct 2021 06:47:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=fh6sF/BIiEwXvAs7PLzvt8wcS329DA+4r3qrafzmBU8=; b=CKH7QD/lxJx0Z/Q+zYtqQeGJqBYBXdQQbMtn5dWVNwUEDW/sWeqr+JJ+UOeLp8f+kU VIIVP910toih4dUCD0Cnffat7Zvf/oSb+/7Z2I4Rms8P6WhlM5Ximxto6VaaEzDFnNlL HMqAPPPLHNDfX58+hd8LuSWp9TzO/rGxDKHJgn3V69/jhXQb+XsMW5ubTGeT1NxHr8p6 umvyvwzYvg8yb1P6TAn1viZqxWkBoKXImfI0MvVwTHhwwgTnoP4Sre+K4i5BuupyUk5H baEXJf3NneYHhKRAQ/3ORr85m/1em34tgdyO65zYzQnAshUHbzEL4U8UDOY8yiI2A+Un w+pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fh6sF/BIiEwXvAs7PLzvt8wcS329DA+4r3qrafzmBU8=; b=p09isZpVGK7h4wW4U0XfrRIdADvAJaH97IWwkMOzvBZfOZeHCdxLUH0gLHhuWfh+5n 95Eqiky1BO4keUUIBy3WQf2+G7f1OG+CupQ0rQ17RgJ8SEi/Fy6CoJCWCVRDFdOTfX2Z miuCFWzbRQ1wxdqXutJiVDRD0SoRqrZk4w+78h7tybUoqKUlpOYb23tgnLhJNuhD1QxG hPhroDskVDTAfpJwAtdVsS2uhQNmjJoCB1WWIZF+mLhv/fbmoplQ65DlPZA3xcVwumvx TwC1ttWJJqjvlLv1KkpSKBnu7Z7NNCfEhnBoBAuifLVov/uTdCbmWFkS+/vkBaUd45t6 JmRg== X-Gm-Message-State: AOAM531igueezS0ZmYaLCNqHUbQXXuS5pQ/6kQoT70LMh0I0swMPVcLd D99w9SjLC3XQzyyJxk9+6TObvJnVlIw= X-Google-Smtp-Source: ABdhPJxrNJolU1yL5tv2/uOkIwpp+0NZz5fhYpXxTm4jJ8A2vFbroXiwCoU2vv/tistnzPy7HBj9EQ== X-Received: by 2002:a05:6512:754:: with SMTP id c20mr3890646lfs.302.1633182434789; Sat, 02 Oct 2021 06:47:14 -0700 (PDT) Received: from localhost.localdomain ([88.201.161.72]) by smtp.gmail.com with ESMTPSA id e5sm952648ljj.129.2021.10.02.06.47.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Oct 2021 06:47:14 -0700 (PDT) From: Oleg Pykhalov Date: Sat, 2 Oct 2021 16:45:58 +0300 Message-Id: <20211002134603.6229-7-go.wigust@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211002134603.6229-1-go.wigust@gmail.com> References: <20211002134603.6229-1-go.wigust@gmail.com> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/home-services/xdg.scm: Rename to gnu/services/xdg.scm. * gnu/local.mk: Same. * gnu/home.scm: Replace (gnu home-services xdg) with (gnu services xdg). --- gnu/home.scm | 2 +- gnu/local.mk | 2 +- gnu/{home-services => services}/xdg.scm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename gnu/{home-services => services}/xdg.scm (99%) diff --git a/gnu/home.scm b/gnu/home.scm index a36b41daf9..fc4193385e 100644 --- a/gnu/home.scm +++ b/gnu/home.scm @@ -20,7 +20,7 @@ #:use-module (gnu home-services) #:use-module (gnu services symlink-manager) #:use-module (gnu services shells) - #:use-module (gnu home-services xdg) + #:use-module (gnu services xdg) #:use-module (gnu services fontutils) #:use-module (gnu services) #:use-module (guix records) diff --git a/gnu/local.mk b/gnu/local.mk index c549a96966..97ff893bf7 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -77,7 +77,6 @@ GNU_SYSTEM_MODULES = \ %D%/home-services.scm \ %D%/home-services/shepherd.scm \ %D%/home-services/mcron.scm \ - %D%/home-services/xdg.scm \ %D%/image.scm \ %D%/packages.scm \ %D%/packages/abduco.scm \ @@ -665,6 +664,7 @@ GNU_SYSTEM_MODULES = \ %D%/services/vpn.scm \ %D%/services/utils.scm \ %D%/services/web.scm \ + %D%/services/xdg.scm \ %D%/services/xorg.scm \ \ %D%/system.scm \ diff --git a/gnu/home-services/xdg.scm b/gnu/services/xdg.scm similarity index 99% rename from gnu/home-services/xdg.scm rename to gnu/services/xdg.scm index 183bca630c..47e1751f75 100644 --- a/gnu/home-services/xdg.scm +++ b/gnu/services/xdg.scm @@ -17,7 +17,7 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (gnu home-services xdg) +(define-module (gnu services xdg) #:use-module (gnu services configuration) #:use-module (gnu services configuration) #:use-module (gnu home-services) From patchwork Sat Oct 2 13:45:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Oleg Pykhalov X-Patchwork-Id: 33555 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 80AA827BBE3; Sat, 2 Oct 2021 14:48:34 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C247627BBE1 for ; Sat, 2 Oct 2021 14:48:33 +0100 (BST) Received: from localhost ([::1]:53364 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWfNQ-0000G4-4K for patchwork@mira.cbaines.net; Sat, 02 Oct 2021 09:48:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWfN0-0008Cx-SW for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46827) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWfN0-0002qY-LF for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mWfN0-0002vy-JQ for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50967] [PATCH 08/12] gnu: home-services: Move shepherd to (gnu services). Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 02 Oct 2021 13:48:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50967 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50967@debbugs.gnu.org Cc: Oleg Pykhalov Received: via spool by 50967-submit@debbugs.gnu.org id=B50967.163318246111142 (code B ref 50967); Sat, 02 Oct 2021 13:48:06 +0000 Received: (at 50967) by debbugs.gnu.org; 2 Oct 2021 13:47:41 +0000 Received: from localhost ([127.0.0.1]:58362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWfMW-0002tC-Tf for submit@debbugs.gnu.org; Sat, 02 Oct 2021 09:47:40 -0400 Received: from mail-lf1-f42.google.com ([209.85.167.42]:44583) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWfMH-0002pP-JT for 50967@debbugs.gnu.org; Sat, 02 Oct 2021 09:47:26 -0400 Received: by mail-lf1-f42.google.com with SMTP id y26so50579127lfa.11 for <50967@debbugs.gnu.org>; Sat, 02 Oct 2021 06:47:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jBCGXwko3ry0vqp8RqjtfEPtP3jo9R7YU9+NAx3L61c=; b=MZHqnrBtMw0HCXkSoNxxHz7cnRkR13RmxuVAs+C8xGVpOBtexabp/ZJYmJzgjtUCrn nHF3zJpro1cqKcTGq0uDsN8OKE8GZMJyDVm8L+t/f2uce8oP/TX/CkUivspHH1L76y3w kph6RqMr1ia7uhp8Uc/YRatknkBejZAOihTWLBSl9sEaOvbjzPZLLaO9A9uFChSmwUss WQG0tdA/S+wyEadbaqNwbQnVRJSDmscBSQBzDmpL7mBEYDYZEwY0kMUP71M13sW6CYHq T6xVVwt+jv6W0WMzDbjf6HKvJ/+9X+JkjuESy5QxWeu5ep3W/b8a02y1YCDsra4dBDfX Usqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jBCGXwko3ry0vqp8RqjtfEPtP3jo9R7YU9+NAx3L61c=; b=q1ijPvXl8CiBjGsTofa9mAStt5xDAMz8cgZSqvlZG+daEwtEhcnWjaESFQqHwSS03w jvYVlcdBMbG8L/WR21l+zgz6fRZPjX6fpkg1sKBkNkSEr1Nn/ceamj4PxXp1wDacmWy0 OyntvJuSCkWDoIMXnUtGU7x52XWEGEM+T6Jq9lXUq572R7FkyNe3E1w1txGwY/dCeRu0 s4ugW/gNW25VrCMVuxdgUi8CAgp9F23w8IGV914KsWnZaNnlIvg5Rr/tiwMSpV6BwC9y 27V+fzU//ydNSPyL9WLId5I25bx7dV6SLzb6j2zGClK2HqQZBrTWv+Ft5LL/cdf+JY4K UU6A== X-Gm-Message-State: AOAM532msQwtONvmqVlzZTt3X4c4eRvnXA2tFdbTVkollWyRXMP3+ixq Ws52WoUvDgdn9wVBYT+ZbrhGaCKE8aE= X-Google-Smtp-Source: ABdhPJx9s6I6Ru4gmqZTblh+9SQuPJlSISv1AAMIqasEkztaDC2rFBo3TEH9h8mBvNxzFmVNDsvBoA== X-Received: by 2002:a05:6512:12c9:: with SMTP id p9mr4099841lfg.345.1633182435527; Sat, 02 Oct 2021 06:47:15 -0700 (PDT) Received: from localhost.localdomain ([88.201.161.72]) by smtp.gmail.com with ESMTPSA id e5sm952648ljj.129.2021.10.02.06.47.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Oct 2021 06:47:15 -0700 (PDT) From: Oleg Pykhalov Date: Sat, 2 Oct 2021 16:45:59 +0300 Message-Id: <20211002134603.6229-8-go.wigust@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211002134603.6229-1-go.wigust@gmail.com> References: <20211002134603.6229-1-go.wigust@gmail.com> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/home-services/shepherd.scm: Move content ... * gnu/services/shepherd.scm: ... here. * gnu/local.mk: Delete gnu/home-services/shepherd.scm. * gnu/home-services/mcron.scm: Replace (gnu home-services shepherd) with (gnu services shepherd). * tests/guix-home.sh: Same. --- gnu/home-services/mcron.scm | 2 +- gnu/home-services/shepherd.scm | 134 --------------------------------- gnu/local.mk | 1 - gnu/services/shepherd.scm | 112 ++++++++++++++++++++++++++- tests/guix-home.sh | 2 +- 5 files changed, 113 insertions(+), 138 deletions(-) delete mode 100644 gnu/home-services/shepherd.scm diff --git a/gnu/home-services/mcron.scm b/gnu/home-services/mcron.scm index fdfde179a5..a4e09f509c 100644 --- a/gnu/home-services/mcron.scm +++ b/gnu/home-services/mcron.scm @@ -20,7 +20,7 @@ (define-module (gnu home-services mcron) #:use-module (gnu packages guile-xyz) #:use-module (gnu home-services) - #:use-module (gnu home-services shepherd) + #:use-module (gnu services shepherd) #:use-module (gnu services shepherd) #:use-module (guix records) #:use-module (guix gexp) diff --git a/gnu/home-services/shepherd.scm b/gnu/home-services/shepherd.scm deleted file mode 100644 index 120cfde1a1..0000000000 --- a/gnu/home-services/shepherd.scm +++ /dev/null @@ -1,134 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2021 Andrew Tropin -;;; Copyright © 2021 Xinglu Chen -;;; -;;; This file is part of GNU Guix. -;;; -;;; GNU Guix is free software; you can redistribute it and/or modify it -;;; under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 3 of the License, or (at -;;; your option) any later version. -;;; -;;; GNU Guix is distributed in the hope that it will be useful, but -;;; WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Guix. If not, see . - -(define-module (gnu home-services shepherd) - #:use-module (gnu home-services) - #:use-module (gnu packages admin) - #:use-module (gnu services shepherd) - #:use-module (guix sets) - #:use-module (guix gexp) - #:use-module (guix records) - - #:use-module (srfi srfi-1) - - #:export (home-shepherd-service-type - home-shepherd-configuration) - #:re-export (shepherd-service - shepherd-action)) - -(define-record-type* - home-shepherd-configuration make-home-shepherd-configuration - home-shepherd-configuration? - (shepherd home-shepherd-configuration-shepherd - (default shepherd)) ; package - (auto-start? home-shepherd-configuration-auto-start? - (default #t)) - (services home-shepherd-configuration-services - (default '()))) - -(define (home-shepherd-configuration-file services shepherd) - "Return the shepherd configuration file for SERVICES. SHEPHERD is used -as shepherd package." - (assert-valid-graph services) - - (let ((files (map shepherd-service-file services)) - ;; TODO: Add compilation of services, it can improve start - ;; time. - ;; (scm->go (cute scm->go <> shepherd)) - ) - (define config - #~(begin - (use-modules (srfi srfi-34) - (system repl error-handling)) - (apply - register-services - (map - (lambda (file) (load file)) - '#$files)) - (action 'root 'daemonize) - (format #t "Starting services...~%") - (for-each - (lambda (service) (start service)) - '#$(append-map shepherd-service-provision - (filter shepherd-service-auto-start? - services))) - (newline))) - - (scheme-file "shepherd.conf" config))) - -(define (launch-shepherd-gexp config) - (let* ((shepherd (home-shepherd-configuration-shepherd config)) - (services (home-shepherd-configuration-services config))) - (if (home-shepherd-configuration-auto-start? config) - (with-imported-modules '((guix build utils)) - #~(let ((log-dir (or (getenv "XDG_LOG_HOME") - (format #f "~a/.local/var/log" (getenv "HOME"))))) - ((@ (guix build utils) mkdir-p) log-dir) - (system* - #$(file-append shepherd "/bin/shepherd") - "--logfile" - (string-append - log-dir - "/shepherd.log") - "--config" - #$(home-shepherd-configuration-file services shepherd)))) - #~""))) - -(define (reload-configuration-gexp config) - (let* ((shepherd (home-shepherd-configuration-shepherd config)) - (services (home-shepherd-configuration-services config))) - #~(system* - #$(file-append shepherd "/bin/herd") - "load" "root" - #$(home-shepherd-configuration-file services shepherd)))) - -(define (ensure-shepherd-gexp config) - #~(if (file-exists? - (string-append - (or (getenv "XDG_RUNTIME_DIR") - (format #f "/run/user/~a" (getuid))) - "/shepherd/socket")) - #$(reload-configuration-gexp config) - #$(launch-shepherd-gexp config))) - -(define-public home-shepherd-service-type - (service-type (name 'home-shepherd) - (extensions - (list (service-extension - home-run-on-first-login-service-type - launch-shepherd-gexp) - (service-extension - home-activation-service-type - ensure-shepherd-gexp) - (service-extension - home-profile-service-type - (lambda (config) - `(,(home-shepherd-configuration-shepherd config)))))) - (compose concatenate) - (extend - (lambda (config extra-services) - (home-shepherd-configuration - (inherit config) - (services - (append (home-shepherd-configuration-services config) - extra-services))))) - (default-value (home-shepherd-configuration)) - (description "Configure and install userland Shepherd."))) - - diff --git a/gnu/local.mk b/gnu/local.mk index 97ff893bf7..fb60e6492e 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -75,7 +75,6 @@ GNU_SYSTEM_MODULES = \ %D%/ci.scm \ %D%/home.scm \ %D%/home-services.scm \ - %D%/home-services/shepherd.scm \ %D%/home-services/mcron.scm \ %D%/image.scm \ %D%/packages.scm \ diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm index 7277273686..46c80472dc 100644 --- a/gnu/services/shepherd.scm +++ b/gnu/services/shepherd.scm @@ -4,6 +4,8 @@ ;;; Copyright © 2018 Carlo Zancanaro ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen ;;; Copyright © 2021 Maxime Devos +;;; Copyright © 2021 Andrew Tropin +;;; Copyright © 2021 Xinglu Chen ;;; ;;; This file is part of GNU Guix. ;;; @@ -28,6 +30,7 @@ #:use-module (guix records) #:use-module (guix derivations) ;imported-modules, etc. #:use-module (guix utils) + #:use-module (gnu home-services) #:use-module (gnu services) #:use-module (gnu services herd) #:use-module (gnu packages admin) @@ -75,7 +78,10 @@ user-processes-service-type - assert-valid-graph)) + assert-valid-graph + + home-shepherd-service-type + home-shepherd-configuration)) ;;; Commentary: ;;; @@ -590,4 +596,108 @@ read-only, just before rebooting/halting. Processes still running after a few seconds after @code{SIGTERM} has been sent are terminated with @code{SIGKILL}."))) + +;;; +;;; Home services +;;; + +(define-record-type* + home-shepherd-configuration make-home-shepherd-configuration + home-shepherd-configuration? + (shepherd home-shepherd-configuration-shepherd + (default shepherd)) ; package + (auto-start? home-shepherd-configuration-auto-start? + (default #t)) + (services home-shepherd-configuration-services + (default '()))) + +(define (home-shepherd-configuration-file services shepherd) + "Return the shepherd configuration file for SERVICES. SHEPHERD is used +as shepherd package." + (assert-valid-graph services) + + (let ((files (map shepherd-service-file services)) + ;; TODO: Add compilation of services, it can improve start + ;; time. + ;; (scm->go (cute scm->go <> shepherd)) + ) + (define config + #~(begin + (use-modules (srfi srfi-34) + (system repl error-handling)) + (apply + register-services + (map + (lambda (file) (load file)) + '#$files)) + (action 'root 'daemonize) + (format #t "Starting services...~%") + (for-each + (lambda (service) (start service)) + '#$(append-map shepherd-service-provision + (filter shepherd-service-auto-start? + services))) + (newline))) + + (scheme-file "shepherd.conf" config))) + +(define (launch-shepherd-gexp config) + (let* ((shepherd (home-shepherd-configuration-shepherd config)) + (services (home-shepherd-configuration-services config))) + (if (home-shepherd-configuration-auto-start? config) + (with-imported-modules '((guix build utils)) + #~(let ((log-dir (or (getenv "XDG_LOG_HOME") + (format #f "~a/.local/var/log" (getenv "HOME"))))) + ((@ (guix build utils) mkdir-p) log-dir) + (system* + #$(file-append shepherd "/bin/shepherd") + "--logfile" + (string-append + log-dir + "/shepherd.log") + "--config" + #$(home-shepherd-configuration-file services shepherd)))) + #~""))) + +(define (reload-configuration-gexp config) + (let* ((shepherd (home-shepherd-configuration-shepherd config)) + (services (home-shepherd-configuration-services config))) + #~(system* + #$(file-append shepherd "/bin/herd") + "load" "root" + #$(home-shepherd-configuration-file services shepherd)))) + +(define (ensure-shepherd-gexp config) + #~(if (file-exists? + (string-append + (or (getenv "XDG_RUNTIME_DIR") + (format #f "/run/user/~a" (getuid))) + "/shepherd/socket")) + #$(reload-configuration-gexp config) + #$(launch-shepherd-gexp config))) + +(define-public home-shepherd-service-type + (service-type (name 'home-shepherd) + (extensions + (list (service-extension + home-run-on-first-login-service-type + launch-shepherd-gexp) + (service-extension + home-activation-service-type + ensure-shepherd-gexp) + (service-extension + home-profile-service-type + (lambda (config) + `(,(home-shepherd-configuration-shepherd config)))))) + (compose concatenate) + (extend + (lambda (config extra-services) + (home-shepherd-configuration + (inherit config) + (services + (append (home-shepherd-configuration-services config) + extra-services))))) + (default-value (home-shepherd-configuration)) + (description "Configure and install userland Shepherd."))) + ;;; shepherd.scm ends here diff --git a/tests/guix-home.sh b/tests/guix-home.sh index cb015c907f..46cd779c81 100644 --- a/tests/guix-home.sh +++ b/tests/guix-home.sh @@ -75,7 +75,7 @@ fi cat > "$tmpfile" < X-Patchwork-Id: 33554 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 1BCF127BBE3; Sat, 2 Oct 2021 14:48:16 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 71E9827BBE1 for ; Sat, 2 Oct 2021 14:48:15 +0100 (BST) Received: from localhost ([::1]:52656 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWfN8-0008Cp-I5 for patchwork@mira.cbaines.net; Sat, 02 Oct 2021 09:48:14 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41194) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWfMz-00087r-7a for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46823) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWfMz-0002pb-0M for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mWfMy-0002vV-VL for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50967] [PATCH 09/12] gnu: home-services: Move mcron to (gnu services). Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 02 Oct 2021 13:48:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50967 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50967@debbugs.gnu.org Cc: Oleg Pykhalov Received: via spool by 50967-submit@debbugs.gnu.org id=B50967.163318245611088 (code B ref 50967); Sat, 02 Oct 2021 13:48:04 +0000 Received: (at 50967) by debbugs.gnu.org; 2 Oct 2021 13:47:36 +0000 Received: from localhost ([127.0.0.1]:58354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWfMU-0002sc-W4 for submit@debbugs.gnu.org; Sat, 02 Oct 2021 09:47:35 -0400 Received: from mail-lf1-f41.google.com ([209.85.167.41]:43833) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWfMI-0002pR-E2 for 50967@debbugs.gnu.org; Sat, 02 Oct 2021 09:47:23 -0400 Received: by mail-lf1-f41.google.com with SMTP id e15so50340434lfr.10 for <50967@debbugs.gnu.org>; Sat, 02 Oct 2021 06:47:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=btGaGTJckl/MDRw0JM/AUiT3eq5XPTPBZEnryiNHkKE=; b=e0N+z8w0q3oXnQPX0fVLjx9zMzHmC6uxWBgERK8Bmm7Np7bPwadXkSsVrr3u12IiQ3 2+npX/o7SwxlxY0OMOX+i64kYRxFLGOxJxOGfroqkv8dqwJR6f6KjFSbEWxOxZCx1hJy +GMjFqJWN5iEI/Qvxw3VYIRjmtIvAoyc8h3FFQQ7ISuuzM5cgIipxtZuBF6ErQhXQfti 1HQOGFne4n4akQ3ly7fM7LKd/nzhnSRPFPJrRyXely99MwQDSoq3jHySm3gAJ79y1ObN G0bBG0ziH+o1Dwrce6qfQYvev2jqAErmMhLiOONkR8Ov7/bSTKwNXkT9y97oJFPJZiT9 TyNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=btGaGTJckl/MDRw0JM/AUiT3eq5XPTPBZEnryiNHkKE=; b=WI7zlSfq7drN7GvyOsJvo2w6cmGLnZ8WBSpiVAzE9ROvGWK8diQvMHNBat9QDxNHjZ IpqX5eRooshXxcj8LYy8tlM5EqT9w9IpHlXKNpgiFC7PxaO+DAsHqH3zRKAMddgLaqs6 bGMH73hBnzsLQRuvY1EedKBo7/Rzw6llCL9WPTd3X1+dBKlRV0rLpHRkmUp4t7CAttRh vwFAz1cRIiD1j5UITQwvNRI6cISqxEfZmOiO3OCNoaoyBaZ62BsOJ58X+4sZF1BrrDm7 tL/A6zo1qkSLldkNl1NuCZ2yXR9X2Z36HQ2F19RWp3UHAesCQwVhgbcbY/PkDpCCp4zv SW/g== X-Gm-Message-State: AOAM533qVlhyaCoOeMfnax90N0yGfCSMAGBXEQBF98d5VMArwfkXxaz0 f6tzFjd8FdIha5rNbtIKPg8pJZYJKUI= X-Google-Smtp-Source: ABdhPJyCIIdTlCw9+hezk8jt/mHsW46RxMkJETW5P79t0LCJz6Y/One9FiJtJ60fyD9bXqa+uR0jBg== X-Received: by 2002:a05:6512:10ca:: with SMTP id k10mr3831285lfg.327.1633182436297; Sat, 02 Oct 2021 06:47:16 -0700 (PDT) Received: from localhost.localdomain ([88.201.161.72]) by smtp.gmail.com with ESMTPSA id e5sm952648ljj.129.2021.10.02.06.47.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Oct 2021 06:47:15 -0700 (PDT) From: Oleg Pykhalov Date: Sat, 2 Oct 2021 16:46:00 +0300 Message-Id: <20211002134603.6229-9-go.wigust@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211002134603.6229-1-go.wigust@gmail.com> References: <20211002134603.6229-1-go.wigust@gmail.com> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/home-services/mcron.scm: Move content without delete job-files and shepherd-schedule-action ... * gnu/services/mcron.scm: ... here. * gnu/local.mk: Delete gnu/home-services/mcron.scm. * doc/guix.texi: Replace (gnu home-services mcron) with (gnu services mcron). --- doc/guix.texi | 2 +- gnu/home-services/mcron.scm | 115 ------------------------------------ gnu/local.mk | 1 - gnu/services/mcron.scm | 89 +++++++++++++++++++++++++++- 4 files changed, 89 insertions(+), 118 deletions(-) delete mode 100644 gnu/home-services/mcron.scm diff --git a/doc/guix.texi b/doc/guix.texi index a72a726b54..d06590ab8c 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -35810,7 +35810,7 @@ for example). @cindex mcron @cindex scheduling jobs -The @code{(gnu home-services mcron)} module provides an interface to +The @code{(gnu services mcron)} module provides an interface to GNU@tie{}mcron, a daemon to run jobs at scheduled times (@pxref{Top,,, mcron, GNU@tie{}mcron}). The information about system's mcron is applicable here (@pxref{Scheduled Job Execution}), the only difference diff --git a/gnu/home-services/mcron.scm b/gnu/home-services/mcron.scm deleted file mode 100644 index a4e09f509c..0000000000 --- a/gnu/home-services/mcron.scm +++ /dev/null @@ -1,115 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2021 Andrew Tropin -;;; Copyright © 2021 Xinglu Chen -;;; -;;; This file is part of GNU Guix. -;;; -;;; GNU Guix is free software; you can redistribute it and/or modify it -;;; under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 3 of the License, or (at -;;; your option) any later version. -;;; -;;; GNU Guix is distributed in the hope that it will be useful, but -;;; WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Guix. If not, see . - -(define-module (gnu home-services mcron) - #:use-module (gnu packages guile-xyz) - #:use-module (gnu home-services) - #:use-module (gnu services shepherd) - #:use-module (gnu services shepherd) - #:use-module (guix records) - #:use-module (guix gexp) - #:use-module (srfi srfi-1) - #:use-module (ice-9 match) - - #:export (home-mcron-configuration - home-mcron-service-type)) - -;;; Commentary: -;; -;; Service for the GNU mcron cron job manager. -;; -;; Example configuration, the first job runs mbsync once every ten -;; minutes, the second one writes "Mcron service" to ~/mcron-file once -;; every minute. -;; -;; (service home-mcron-service-type -;; (home-mcron-configuration -;; (jobs (list #~(job '(next-minute -;; (range 0 60 10)) -;; (lambda () -;; (system* "mbsync" "--all"))) -;; #~(job next-minute-from -;; (lambda () -;; (call-with-output-file (string-append (getenv "HOME") -;; "/mcron-file") -;; (lambda (port) -;; (display "Mcron service" port))))))))) -;; -;;; Code: - -(define-record-type* home-mcron-configuration - make-home-mcron-configuration - home-mcron-configuration? - (package home-mcron-configuration-package ; package - (default mcron)) - (jobs home-mcron-configuration-jobs ; list of jobs - (default '()))) - -(define job-files (@@ (gnu services mcron) job-files)) -(define shepherd-schedule-action - (@@ (gnu services mcron) shepherd-schedule-action)) - -(define home-mcron-shepherd-services - (match-lambda - (($ mcron '()) ; no jobs to run - '()) - (($ mcron jobs) - (let ((files (job-files mcron jobs))) - (list (shepherd-service - (documentation "User cron jobs.") - (provision '(mcron)) - (modules `((srfi srfi-1) - (srfi srfi-26) - (ice-9 popen) ; for the 'schedule' action - (ice-9 rdelim) - (ice-9 match) - ,@%default-modules)) - (start #~(make-forkexec-constructor - (list #$(file-append mcron "/bin/mcron") #$@files) - #:log-file (string-append - (or (getenv "XDG_LOG_HOME") - (format #f "~a/.local/var/log" - (getenv "HOME"))) - "/mcron.log"))) - (stop #~(make-kill-destructor)) - (actions - (list (shepherd-schedule-action mcron files))))))))) - -(define home-mcron-profile (compose list home-mcron-configuration-package)) - -(define (home-mcron-extend config jobs) - (home-mcron-configuration - (inherit config) - (jobs (append (home-mcron-configuration-jobs config) - jobs)))) - -(define home-mcron-service-type - (service-type (name 'home-mcron) - (extensions - (list (service-extension - home-shepherd-service-type - home-mcron-shepherd-services) - (service-extension - home-profile-service-type - home-mcron-profile))) - (compose concatenate) - (extend home-mcron-extend) - (default-value (home-mcron-configuration)) - (description - "Install and configure the GNU mcron cron job manager."))) diff --git a/gnu/local.mk b/gnu/local.mk index fb60e6492e..ca4c15ba25 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -75,7 +75,6 @@ GNU_SYSTEM_MODULES = \ %D%/ci.scm \ %D%/home.scm \ %D%/home-services.scm \ - %D%/home-services/mcron.scm \ %D%/image.scm \ %D%/packages.scm \ %D%/packages/abduco.scm \ diff --git a/gnu/services/mcron.scm b/gnu/services/mcron.scm index 0e675607f3..79639caee4 100644 --- a/gnu/services/mcron.scm +++ b/gnu/services/mcron.scm @@ -1,5 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2021 Andrew Tropin +;;; Copyright © 2021 Xinglu Chen ;;; ;;; This file is part of GNU Guix. ;;; @@ -19,6 +21,7 @@ (define-module (gnu services mcron) #:use-module (gnu services) #:use-module (gnu services shepherd) + #:use-module (gnu home-services) #:use-module (gnu packages guile-xyz) #:use-module (guix deprecation) #:use-module (guix records) @@ -31,7 +34,10 @@ mcron-configuration-mcron mcron-configuration-jobs - mcron-service-type)) + mcron-service-type + + home-mcron-configuration + home-mcron-service-type)) ;;; Commentary: ;;; @@ -172,4 +178,85 @@ files." jobs))))) (default-value (mcron-configuration)))) ;empty job list + +;;; +;;; Home services +;;; + +;; Service for the GNU mcron cron job manager. +;; +;; Example configuration, the first job runs mbsync once every ten +;; minutes, the second one writes "Mcron service" to ~/mcron-file once +;; every minute. +;; +;; (service home-mcron-service-type +;; (home-mcron-configuration +;; (jobs (list #~(job '(next-minute +;; (range 0 60 10)) +;; (lambda () +;; (system* "mbsync" "--all"))) +;; #~(job next-minute-from +;; (lambda () +;; (call-with-output-file (string-append (getenv "HOME") +;; "/mcron-file") +;; (lambda (port) +;; (display "Mcron service" port))))))))) + +(define-record-type* home-mcron-configuration + make-home-mcron-configuration + home-mcron-configuration? + (package home-mcron-configuration-package ; package + (default mcron)) + (jobs home-mcron-configuration-jobs ; list of jobs + (default '()))) + +(define home-mcron-shepherd-services + (match-lambda + (($ mcron '()) ; no jobs to run + '()) + (($ mcron jobs) + (let ((files (job-files mcron jobs))) + (list (shepherd-service + (documentation "User cron jobs.") + (provision '(mcron)) + (modules `((srfi srfi-1) + (srfi srfi-26) + (ice-9 popen) ; for the 'schedule' action + (ice-9 rdelim) + (ice-9 match) + ,@%default-modules)) + (start #~(make-forkexec-constructor + (list #$(file-append mcron "/bin/mcron") #$@files) + #:log-file (string-append + (or (getenv "XDG_LOG_HOME") + (format #f "~a/.local/var/log" + (getenv "HOME"))) + "/mcron.log"))) + (stop #~(make-kill-destructor)) + (actions + (list (shepherd-schedule-action mcron files))))))))) + +(define home-mcron-profile (compose list home-mcron-configuration-package)) + +(define (home-mcron-extend config jobs) + (home-mcron-configuration + (inherit config) + (jobs (append (home-mcron-configuration-jobs config) + jobs)))) + +(define home-mcron-service-type + (service-type (name 'home-mcron) + (extensions + (list (service-extension + home-shepherd-service-type + home-mcron-shepherd-services) + (service-extension + home-profile-service-type + home-mcron-profile))) + (compose concatenate) + (extend home-mcron-extend) + (default-value (home-mcron-configuration)) + (description + "Install and configure the GNU mcron cron job manager."))) + ;;; mcron.scm ends here From patchwork Sat Oct 2 13:46:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleg Pykhalov X-Patchwork-Id: 33560 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 B930C27BBE3; Sat, 2 Oct 2021 14:49:33 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 8BF8327BBE1 for ; Sat, 2 Oct 2021 14:49:33 +0100 (BST) Received: from localhost ([::1]:56082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWfOO-00026t-MB for patchwork@mira.cbaines.net; Sat, 02 Oct 2021 09:49:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41196) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWfMz-00089O-LZ for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46824) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWfMz-0002ph-Da for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mWfMz-0002vc-Bv for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50967] [PATCH 10/12] gnu: home-services: Change %service-type-path and filter services. Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 02 Oct 2021 13:48:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50967 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50967@debbugs.gnu.org Cc: Oleg Pykhalov Received: via spool by 50967-submit@debbugs.gnu.org id=B50967.163318245611097 (code B ref 50967); Sat, 02 Oct 2021 13:48:05 +0000 Received: (at 50967) by debbugs.gnu.org; 2 Oct 2021 13:47:36 +0000 Received: from localhost ([127.0.0.1]:58356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWfMV-0002sn-Ta for submit@debbugs.gnu.org; Sat, 02 Oct 2021 09:47:36 -0400 Received: from mail-lf1-f45.google.com ([209.85.167.45]:34382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWfMI-0002pS-Uw for 50967@debbugs.gnu.org; Sat, 02 Oct 2021 09:47:23 -0400 Received: by mail-lf1-f45.google.com with SMTP id g41so50050625lfv.1 for <50967@debbugs.gnu.org>; Sat, 02 Oct 2021 06:47:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Z6zrvIlaa8PlGR71I9vmYVzYjlIpTJvdibX9RB31liQ=; b=Px3CEZwmjv/lxl0r8ay7rMNl3sfsAORGxYqLG/OUbLJk0SOoI5kIyF5bEMmXzg8M1w VTynOK0Ml4GXy5rortkvxGaO+ZRdMiLi9GfdreqFsgqyTv30vgI1Y732wpJH26zVIIOw NWjeJhuwKaqNS97XqNbeE3ibzWB+nKiXKRT2fs7clGPmFlQAXMG4Uv3nCHjLMbPmTELC OyZDX9jdJyClEgByd7EZlCPFHxil+K2pJrsfj0WaxT1evAABIj+J+TOJ0PozLuY7Pixn cFaqWcUDiT1TU21sNpnwlNeHMLaScBwO92JLXEvM4My0OXuxE7AzipUPTWTHOC4gq/zZ yGbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Z6zrvIlaa8PlGR71I9vmYVzYjlIpTJvdibX9RB31liQ=; b=luSoacZrfO3YVnjeJ+qw8D/wCR19CmitgUqElGPGJL2pxYOTeyZ+QzDlYeJsaN3jkf MifdckqZuo6yfIZHcXEmYI4f7vB7xmAhfJzTNlwMc4ft2HXFu0gfCELjXXRKJziSKI2E LR2xfEELeVi9HIWpEuOGJoOECKIgS77EvJWeTVOSHn6yxPtzTFskawh7KlodF8YTbFWT fNY1pbirCUilgAVzBO427AvhOdGp3Qb/1C8OBL1FELzeGBIRgMDKfgS1RTeAr24ELbOA O4WUJtEK83YBtn1j0bcw2dSvAzdZ481qLWKIRzDVnGRsgEKeNfBPmVZCiLWGQKAYFjsU MEUw== X-Gm-Message-State: AOAM53236/6RXT7Y1NJFA57b+a3Pv7g0vFJR7sSjJS5cbV+MasnF5smc wqPEdZyc88iE9J9lw4rNPov/EEt6ujE= X-Google-Smtp-Source: ABdhPJzpHj91Imz3lpFgK1YMKIhXd0b5cLYeQt5w5blAvC0YUpiMKXExbNIS80VvU6+Yc4X0y6qB7w== X-Received: by 2002:a19:700a:: with SMTP id h10mr3785817lfc.532.1633182437069; Sat, 02 Oct 2021 06:47:17 -0700 (PDT) Received: from localhost.localdomain ([88.201.161.72]) by smtp.gmail.com with ESMTPSA id e5sm952648ljj.129.2021.10.02.06.47.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Oct 2021 06:47:16 -0700 (PDT) From: Oleg Pykhalov Date: Sat, 2 Oct 2021 16:46:01 +0300 Message-Id: <20211002134603.6229-10-go.wigust@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211002134603.6229-1-go.wigust@gmail.com> References: <20211002134603.6229-1-go.wigust@gmail.com> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/home-services.scm (%service-type-path): Search home services in "gnu/services". * gnu/home-services.scm (fold-home-service-types): Filter home services. --- gnu/home-services.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/gnu/home-services.scm b/gnu/home-services.scm index 9f1e986616..bc4b857715 100644 --- a/gnu/home-services.scm +++ b/gnu/home-services.scm @@ -512,7 +512,7 @@ environment, and its configuration file, when available."))) (define %service-type-path ;; Search path for service types. - (make-parameter `((,%guix-home-root-directory . "gnu/home-services")))) + (make-parameter `((,%guix-home-root-directory . "gnu/services")))) (define (all-home-service-modules) "Return the default set of home-service modules." @@ -521,4 +521,9 @@ environment, and its configuration file, when available."))) #:warn warn-about-load-error))) (define* (fold-home-service-types proc seed) - (fold-service-types proc seed (all-home-service-modules))) + (filter (match-lambda + ((service-type . _) + (string-prefix? "home-" + (symbol->string + (service-type-name service-type))))) + (fold-service-types proc seed (all-home-service-modules)))) From patchwork Sat Oct 2 13:46:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleg Pykhalov X-Patchwork-Id: 33561 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 E568527BBE3; Sat, 2 Oct 2021 14:49:51 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id BEB5027BBE1 for ; Sat, 2 Oct 2021 14:49:51 +0100 (BST) Received: from localhost ([::1]:56674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWfOg-0002W6-S4 for patchwork@mira.cbaines.net; Sat, 02 Oct 2021 09:49:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWfN0-0008AS-1A for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46825) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWfMz-0002pn-PT for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mWfMz-0002vj-O7 for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50967] [PATCH 11/12] scripts: home: (gnu home-services bash) -> (gnu services bash). Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 02 Oct 2021 13:48:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50967 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50967@debbugs.gnu.org Cc: Oleg Pykhalov Received: via spool by 50967-submit@debbugs.gnu.org id=B50967.163318245611105 (code B ref 50967); Sat, 02 Oct 2021 13:48:05 +0000 Received: (at 50967) by debbugs.gnu.org; 2 Oct 2021 13:47:36 +0000 Received: from localhost ([127.0.0.1]:58358 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWfMW-0002sw-AX for submit@debbugs.gnu.org; Sat, 02 Oct 2021 09:47:36 -0400 Received: from mail-lf1-f43.google.com ([209.85.167.43]:41613) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWfMJ-0002pU-JR for 50967@debbugs.gnu.org; Sat, 02 Oct 2021 09:47:24 -0400 Received: by mail-lf1-f43.google.com with SMTP id j5so45508301lfg.8 for <50967@debbugs.gnu.org>; Sat, 02 Oct 2021 06:47:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0+Jrp/MAVzeGSsI/T4QMSkxt0UUX9LfWZPClX0ypuic=; b=Pd4gaDHkPtz8N+03aJL4LeZzYLgz2wEksncKpHslv2KsUKghJztTyzN0pJu9SjTAKJ gUkJEBAnrjP6rvz1ARn2ZlHbgXbkDuuoVz7irvw2dXC20/YIvD4DwjsKMNsM/UfTLVzR kiBhUmuCG9R9CxBlOczkAxyH9jDnXuRYy2rxxcFLbaKNG5NWJaVwHzVqAUoNgbbkQMRP Qd0F3DsD2ToMYyscnJZGxBaQWkzBpPsaYFCLh9LJgWHrlW32jQpDrjYMwJVl72re2EXo 6mOiLOR/GmTGx6gSAhKR/4VoRMtcPEawILFH1Ddib0e9cB+jsnB68dSdCnwohwYmU1mC +nmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0+Jrp/MAVzeGSsI/T4QMSkxt0UUX9LfWZPClX0ypuic=; b=t2UJy9LM6Lt5wbLvaUESX/LZcRdkQJqW5FSgIHudQyjaIyaIl5a5XV5wg75F9u6MIV GBjmQUHDh8Pxjl9mKrDKoEa2H19e110PaODw4PndYXyKtiS5pVzslKQCzXEUVnH6bhdV +MTXWp30ZXM8WviqDIbMA5zPXWFNZXUS+IlxQ+MRbFaT1kg8i8cVwrWs1a/2IiMe0RoC mDaAlmHA37T6QceDRwrfijdQSlMt6ZEIXIzs4bRq559mXiG3Sh5gFI7nwzl3zc2DFxOf aEAovjwkv4eiPBXoTgf/zGCSZrIsXHKYlEG1m2jtharczY13TPtP+vfAlFgkKSHghnVd hR4Q== X-Gm-Message-State: AOAM5301MTA6IkIZq5vEjb73T7fSfrVVuhbvOZcmeL2PUPFACRFRZ9ab UjyYxGgU+95reKsi9saMJxMhsQsu6Jo= X-Google-Smtp-Source: ABdhPJz4vb2obvQlH1hmjoD85UoEh+DC/gnwAMdsrkASe5X3rf3dayQ4ohdFv/KTFUt2NSkdvsvVjg== X-Received: by 2002:a05:6512:a91:: with SMTP id m17mr3717100lfu.567.1633182437659; Sat, 02 Oct 2021 06:47:17 -0700 (PDT) Received: from localhost.localdomain ([88.201.161.72]) by smtp.gmail.com with ESMTPSA id e5sm952648ljj.129.2021.10.02.06.47.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Oct 2021 06:47:17 -0700 (PDT) From: Oleg Pykhalov Date: Sat, 2 Oct 2021 16:46:02 +0300 Message-Id: <20211002134603.6229-11-go.wigust@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211002134603.6229-1-go.wigust@gmail.com> References: <20211002134603.6229-1-go.wigust@gmail.com> 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" X-getmail-retrieved-from-mailbox: Patches * guix/scripts/home/import.scm: Replace (gnu home-services bash) with (gnu services bash). --- guix/scripts/home/import.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guix/scripts/home/import.scm b/guix/scripts/home/import.scm index 79fb23a2fd..98dcdea388 100644 --- a/guix/scripts/home/import.scm +++ b/guix/scripts/home/import.scm @@ -41,7 +41,7 @@ (let ((rc (string-append (getenv "HOME") "/.bashrc")) (profile (string-append (getenv "HOME") "/.bash_profile")) (logout (string-append (getenv "HOME") "/.bash_logout"))) - `((gnu home-services bash) + `((gnu services bash) (service home-bash-service-type (home-bash-configuration ,@(if (file-exists? rc) From patchwork Sat Oct 2 13:46:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleg Pykhalov X-Patchwork-Id: 33562 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 7F9FE27BBE3; Sat, 2 Oct 2021 14:50:03 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id F0A8C27BBE1 for ; Sat, 2 Oct 2021 14:50:02 +0100 (BST) Received: from localhost ([::1]:57298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWfOs-0002wF-1i for patchwork@mira.cbaines.net; Sat, 02 Oct 2021 09:50:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWfN0-0008Bb-FM for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:06 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46826) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWfN0-0002pv-7g for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mWfN0-0002vr-62 for guix-patches@gnu.org; Sat, 02 Oct 2021 09:48:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50967] [PATCH 12/12] doc: (gnu home-services) -> (gnu services). Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 02 Oct 2021 13:48:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50967 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50967@debbugs.gnu.org Cc: Oleg Pykhalov Received: via spool by 50967-submit@debbugs.gnu.org id=B50967.163318245711113 (code B ref 50967); Sat, 02 Oct 2021 13:48:06 +0000 Received: (at 50967) by debbugs.gnu.org; 2 Oct 2021 13:47:37 +0000 Received: from localhost ([127.0.0.1]:58360 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWfMW-0002t4-JV for submit@debbugs.gnu.org; Sat, 02 Oct 2021 09:47:36 -0400 Received: from mail-lf1-f43.google.com ([209.85.167.43]:46808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mWfMK-0002pl-Kf for 50967@debbugs.gnu.org; Sat, 02 Oct 2021 09:47:24 -0400 Received: by mail-lf1-f43.google.com with SMTP id i24so2048696lfj.13 for <50967@debbugs.gnu.org>; Sat, 02 Oct 2021 06:47:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xEMQ0Ttl02W7QhmeqB8l0MRW3dY/q7kbbq+4GhMKV4Q=; b=UZjoXToYsQIZVWksErPHsSh6E36R63SpbFbZWeJsU+k9dTCyYT6VWWdQ67CHTWyRed VaxhaSZ0hDm0tHCGV4ro2YiAjMM9r8AUz+WU5j5iduOt/9+EMw2aCIShNQW+XUJteXJn dB8ATCAT02QqYtl9K/lvVJrPtD14MF+Dcb8l6fjRygOBwuu2g47L5Yt7TLf4J5gDxFop ycG1TgaZZr67Kb8KZTAzIG21ZJ37AM+b7K9De19GBGAAnFO3ZAH0c3GDAVTnYiTsYO4l eCBZ706H/LOvgt9NEVBjSbl4ptg6WCAH/f9inXd20ecPlHZmutq1rHVdf2px1yiG647F IA3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xEMQ0Ttl02W7QhmeqB8l0MRW3dY/q7kbbq+4GhMKV4Q=; b=yAU8Xn/tYuD+0g+nCJl+HSNjQeEeLwy7It0cnJrh5+vk+1d9oJnOeJrngeDU62KfXH 74AscwYu6/MlwCE+cgkUBTSfNbbWWFzwzGcRu882KfijS++hl4yNm9YvWsesKRcKcD+D RXo5H1TmU/Mrcy+2z/B1iiLsq1cXYMfh0UDuKcTpWcewEAVrObZakR/FCH/l3J/2DV4T loUdNOTSUmqaYzMMEvhnsGFRd2QppTDe5HvI0d4jnFrv+Gp7AZole3nL6mNVFS+L56v/ 399aF1AUpR344T0Xrmz9OefPZeMQaGKMPF73TFKNccHLrR7FgH2tVfAB1MCqunyJOGYl IwRw== X-Gm-Message-State: AOAM530rYaaBZgg/NmOzWFjKP/gEWgXFHVE8a8YzIipXyYzyJOiLekpB bq6SzNVLG0WOStlpR8/Y+ksRdIj5t48= X-Google-Smtp-Source: ABdhPJyEnLve8oWbXMTJrqicz7O45JNobxVXXS1As9DAkItWtaY6evPKZ/gayDWZze4I+gD/5RTGXQ== X-Received: by 2002:a2e:b051:: with SMTP id d17mr3845887ljl.470.1633182438217; Sat, 02 Oct 2021 06:47:18 -0700 (PDT) Received: from localhost.localdomain ([88.201.161.72]) by smtp.gmail.com with ESMTPSA id e5sm952648ljj.129.2021.10.02.06.47.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Oct 2021 06:47:17 -0700 (PDT) From: Oleg Pykhalov Date: Sat, 2 Oct 2021 16:46:03 +0300 Message-Id: <20211002134603.6229-12-go.wigust@gmail.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211002134603.6229-1-go.wigust@gmail.com> References: <20211002134603.6229-1-go.wigust@gmail.com> 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" X-getmail-retrieved-from-mailbox: Patches * doc/guix.texi: Replace (gnu home-services) with (gnu services). --- doc/guix.texi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index d06590ab8c..a647ea150a 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -35555,9 +35555,9 @@ services)}. @node Essential Home Services @subsection Essential Home Services -There are a few essential services defined in @code{(gnu -home-services)}, they are mostly for internal use and are required to -build a home environment, but some of them will be useful for the end +There are a few essential home services defined in +@code{(gnu services)}, they are mostly for internal use and are required +to build a home environment, but some of them will be useful for the end user. @cindex environment variables