From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id yB2ZMGrC2GRGeAEASxT56A (envelope-from ) for ; Sun, 13 Aug 2023 13:45:46 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id EE0nMGrC2GTWCwEAauVa8A (envelope-from ) for ; Sun, 13 Aug 2023 13:45:46 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 3104554F1D for ; Sun, 13 Aug 2023 13:45:46 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=migalmoreno.com header.s=gm1 header.b=oVmvPvql; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1691927146; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ptCspev06zk0xL6knm/y5hCTX12CEq8VBXJtSZLm2EU=; b=gL+drVV3v40gQrSH/4cNK57mMu9UUuHXaIqk85JJVRJpqS50PSwgsDI06CTtqmX0jjcPRr fbKBhS1IqYSluDMfG/3PoEZ+L0/jhopf8hxf4k/mWENNrD01LtS2I1Aw4x0eZ6G8C4Gm28 35d9aeZ9C0Rp3PPEmgPMnxl+xf6THrk0RTaa6vDOirbzcHjlaV6bytgZXNwTnPsFG5V2oG TrqLd9lZgnHMRT5J7YlcFFuqwKni6uZTA9cFeEwu0swm9k9iLNmR03tZ212xJSOgYrp6pj 8oNTjXJvwJPTgG52qd1nGT4SvRDKAtCRDECiMG211cCx8YuVELbmeQpemEnLMQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=migalmoreno.com header.s=gm1 header.b=oVmvPvql; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1691927146; a=rsa-sha256; cv=none; b=YU4IeZcYUOyFdnRNL2RqUcjdwDyMk8S8SQPq52c2/skCmFdgXgdxyAGpSjJSZZ81zr6QG5 VhzxBrXwEwnu/J1zqUjezN3LYGpig3M3rXtv60FU2cL4WcdtwVwuqwVxmWwAUxYwkQdbj+ S/HSChib7iGBfepCjlswmu2S+Y5ws5KXcHVcgybjI22jD10890FxP3ycV+q+tB5oLOjMQH gT9qXsDv6gu7h5ZWi+EiEg/9N8S81v8/PV+BuvOF/p8QGIdmE15BxL6WNCWT1dwEn/UdTA I0Yv4kaNjOIZ/ELRGDFO1eBpWCWrI+03/IW8grfCa5Ny0oHJT6AkfwbcXShbOQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qV9XB-0000CB-Di; Sun, 13 Aug 2023 07:45:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qV9Wq-0000AS-20 for guix-patches@gnu.org; Sun, 13 Aug 2023 07:45:06 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qV9Wo-0004d3-VX for guix-patches@gnu.org; Sun, 13 Aug 2023 07:45:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qV9Wo-0003Tq-LD for guix-patches@gnu.org; Sun, 13 Aug 2023 07:45:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62102] [PATCH v2] services: Add whoogle-service-type. References: <86zg8k8iy8.fsf@conses.eu> In-Reply-To: <86zg8k8iy8.fsf@conses.eu> Resent-From: Miguel =?UTF-8?Q?=C3=81ngel?= Moreno Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 13 Aug 2023 11:45:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62102 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62102@debbugs.gnu.org Received: via spool by 62102-submit@debbugs.gnu.org id=B62102.169192708713327 (code B ref 62102); Sun, 13 Aug 2023 11:45:02 +0000 Received: (at 62102) by debbugs.gnu.org; 13 Aug 2023 11:44:47 +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 1qV9WX-0003Sm-IC for submit@debbugs.gnu.org; Sun, 13 Aug 2023 07:44:46 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:dc4:8::224]:40355) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qV8TC-0007Q6-Hk for 62102@debbugs.gnu.org; Sun, 13 Aug 2023 06:37:15 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 5FF58E0002 for <62102@debbugs.gnu.org>; Sun, 13 Aug 2023 10:37:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=migalmoreno.com; s=gm1; t=1691923026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ptCspev06zk0xL6knm/y5hCTX12CEq8VBXJtSZLm2EU=; b=oVmvPvql5mTFyQCW1qKTlo5ltdzihSbxrAcb4t/T0fTco1K5O301CDTQcuA62BVgHcFODJ WCqj3y6JL+CQU3UNX0N4LlbsdfxEM7+eOwY3x20Zf14YyK/PGJR7anSqvqkhOwspUaXB4p xk3l1te30EtWtD24+cv9FRmCESxKSfncq+oU/EZTMc51GdGZH6W2X1WSNOWFaiINNNbm68 /lIGWducr+uQKAvpjcg485qlWHWd8yoLdbMocU7eKZ1RGkdACRiDzntyTRMMV41VaMVh+3 05Qm77L/OSNcJez0SDeaYFKXb1cF2N8nCB6gtBUBn/MH1asz+LV5GBv5MATqXg== From: Miguel =?UTF-8?Q?=C3=81ngel?= Moreno Date: Sun, 13 Aug 2023 12:37:04 +0200 Message-ID: <864jl344a7.fsf@migalmoreno.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-GND-Sasl: mail@migalmoreno.com X-Mailman-Approved-At: Sun, 13 Aug 2023 07:44:42 -0400 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+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 3104554F1D X-Migadu-Scanner: mx1.migadu.com X-Spam-Score: -0.79 X-Migadu-Spam-Score: -0.79 X-TUID: SijeYVcPLUe6 * gnu/services/web.scm (whoogle-service-type): New variable. * doc/guix.texi (Web Services): Document it. --- doc/guix.texi | 32 +++++++++++++++++++++++++ gnu/services/web.scm | 56 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 409ca2ad62..35746ec21e 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -31031,6 +31031,38 @@ Web Services @end table @end deftp =20 +@subheading Whoogle Search +@cindex Whoogle Search +@uref{https://github.com/benbusby/whoogle-search, Whoogle Search} is a +self-hosted, ad-free, privacy-respecting metasearch engine that collects +and displays Google search results. + +@defvar whoogle-service-type +Service type for Whoogle Search. +@end defvar + +@deftp {Data Type} whoogle-configuration +Data type representing Whoogle Search service configuration. + +@table @asis +@item @code{package} (default: @code{whoogle-search}) +The Whoogle Search package to use. + +@item @code{host} (default: @code{"127.0.0.1"}) +The host address to run Whoogle on. + +@item @code{port} (default: @code{5000}) +The port where Whoogle will be exposed. + +@item @code{environment-variables} (default: @code{'()}) +A list of strings with the environment variables to configure Whoogle. +You can consult +@uref{https://github.com/benbusby/whoogle-search/blob/main/whoogle.templat= e.env, +its environment variables template} for the list of available options. + +@end table +@end deftp + @subsubheading Patchwork @cindex Patchwork Patchwork is a patch tracking system. It can collect patches sent to a diff --git a/gnu/services/web.scm b/gnu/services/web.scm index 818226a4f7..ed53572eec 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -16,6 +16,7 @@ ;;; Copyright =C2=A9 2020, 2021 Alexandru-Sergiu Marton ;;; Copyright =C2=A9 2022 Simen Endsj=C3=B8 ;;; Copyright =C2=A9 2023 Bruno Victal +;;; Copyright =C2=A9 2023 Miguel =C3=81ngel Moreno ;;; ;;; This file is part of GNU Guix. ;;; @@ -36,6 +37,7 @@ (define-module (gnu services web) #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-module (gnu services admin) + #:use-module (gnu services configuration) #:use-module (gnu services getmail) #:use-module (gnu services mail) #:use-module (gnu system pam) @@ -47,6 +49,7 @@ (define-module (gnu services web) #:use-module (gnu packages patchutils) #:use-module (gnu packages php) #:use-module (gnu packages python) + #:use-module (gnu packages python-web) #:use-module (gnu packages gnupg) #:use-module (gnu packages guile) #:use-module (gnu packages logging) @@ -240,6 +243,13 @@ (define-module (gnu services web) =20 varnish-service-type =20 + whoogle-service-type + whoogle-configuration + whoogle-configuration-package + whoogle-configuration-host + whoogle-configuration-port + whoogle-configuration-environment-variables + patchwork-database-configuration patchwork-database-configuration? patchwork-database-configuration-engine @@ -1604,6 +1614,52 @@ (define varnish-service-type (default-value (varnish-configuration)))) =20 + +;;; +;;; Whoogle +;;; + +(define-configuration/no-serialization whoogle-configuration + (package + (package whoogle-search) + "The @code{whoogle-search} package to use.") + (host + (string "127.0.0.1") + "The host address to run Whoogle on.") + (port + (integer 5000) + "The port to run Whoogle on.") + (environment-variables + (list-of-strings '()) + "A list of strings specifying environment variables used to configure +Whoogle.")) + +(define (whoogle-shepherd-service config) + (match-record config + (package host port environment-variables) + (list + (shepherd-service + (provision '(whoogle-search)) + (start #~(make-forkexec-constructor + (list (string-append #$package "/bin/whoogle-search") + "--host" #$host "--port" #$(number->string port)) + #:environment-variables + (append (list "CONFIG_VOLUME=3D/var/cache/whoogle-search") + '#$environment-variables))) + (stop #~(make-kill-destructor)) + (documentation "Run a @code{whoogle-search} instance."))))) + +(define whoogle-service-type + (service-type + (name 'whoogle-search) + (extensions + (list (service-extension shepherd-root-service-type + whoogle-shepherd-service) + (service-extension profile-service-type + (compose list whoogle-configuration-package))= )) + (default-value (whoogle-configuration)) + (description "Set up the @code{whoogle-search} metasearch engine."))) + ;;; ;;; Patchwork --=20 2.41.0 --=20 Best regards, Miguel =C3=81ngel Moreno