diff options
Diffstat (limited to 'gnu/services')
-rw-r--r-- | gnu/services/base.scm | 10 | ||||
-rw-r--r-- | gnu/services/configuration.scm | 2 | ||||
-rw-r--r-- | gnu/services/containers.scm | 7 | ||||
-rw-r--r-- | gnu/services/cuirass.scm | 45 | ||||
-rw-r--r-- | gnu/services/desktop.scm | 8 | ||||
-rw-r--r-- | gnu/services/docker.scm | 2 | ||||
-rw-r--r-- | gnu/services/herd.scm | 2 | ||||
-rw-r--r-- | gnu/services/lightdm.scm | 2 | ||||
-rw-r--r-- | gnu/services/linux.scm | 9 | ||||
-rw-r--r-- | gnu/services/mcron.scm | 2 | ||||
-rw-r--r-- | gnu/services/messaging.scm | 2 | ||||
-rw-r--r-- | gnu/services/networking.scm | 15 | ||||
-rw-r--r-- | gnu/services/nfs.scm | 2 | ||||
-rw-r--r-- | gnu/services/rsync.scm | 2 | ||||
-rw-r--r-- | gnu/services/sddm.scm | 3 | ||||
-rw-r--r-- | gnu/services/sound.scm | 2 | ||||
-rw-r--r-- | gnu/services/telephony.scm | 2 | ||||
-rw-r--r-- | gnu/services/virtualization.scm | 15 | ||||
-rw-r--r-- | gnu/services/vnc.scm | 2 | ||||
-rw-r--r-- | gnu/services/vpn.scm | 2 | ||||
-rw-r--r-- | gnu/services/web.scm | 174 | ||||
-rw-r--r-- | gnu/services/xorg.scm | 2 |
22 files changed, 106 insertions, 206 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm index cfe7099dae..f64f85224b 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -15,7 +15,7 @@ ;;; Copyright © 2020, 2021 Brice Waegeneire <brice@waegenei.re> ;;; Copyright © 2021 qblade <qblade@protonmail.com> ;;; Copyright © 2021 Hui Lu <luhuins@163.com> -;;; Copyright © 2021-2023, 2025 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2021-2023, 2025 Maxim Cournoyer <maxim@guixotic.coop> ;;; Copyright © 2021, 2025 muradm <mail@muradm.net> ;;; Copyright © 2022 Guillaume Le Vaillant <glv@posteo.net> ;;; Copyright © 2022 Justin Veilleux <terramorpha@cock.li> @@ -3986,10 +3986,10 @@ to handle." "user = " default-session-user "\n" "command = " default-session-command "\n" (if (and initial-session-user initial-session-command) - (string-append - "[initial_session]\n" - "user = " initial-session-user "\n" - "command = " initial-session-command "\n") + #~(string-append + "[initial_session]\n" + "user = " #$initial-session-user "\n" + "command = " #$initial-session-command "\n") "")))) (define %greetd-file-systems diff --git a/gnu/services/configuration.scm b/gnu/services/configuration.scm index 6d9fd1feae..0f803e2776 100644 --- a/gnu/services/configuration.scm +++ b/gnu/services/configuration.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2017, 2018 Clément Lassieur <clement@lassieur.org> ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz> -;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim@guixotic.coop> ;;; Copyright © 2021 Andrew Tropin <andrew@trop.in> ;;; Copyright © 2022 Maxime Devos <maximedevos@telenet.be> ;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu> diff --git a/gnu/services/containers.scm b/gnu/services/containers.scm index c9eadea9b4..0c3d6463e4 100644 --- a/gnu/services/containers.scm +++ b/gnu/services/containers.scm @@ -1277,7 +1277,12 @@ by CONFIG through RUNTIME-CLI." (define environment-variables #~(append (list #$@host-environment) - (list #$@(oci-runtime-state-runtime-environment runtime-state)))) + ;; In case this specific container is not run through the user + ;; provisioned by the oci-service-type, its environment is different + ;; from the globally provisioned one and must be recomputed. + (list #$@(if (maybe-value-set? user) + (oci-runtime-system-environment runtime user) + (oci-runtime-state-runtime-environment runtime-state))))) (define invocation (oci-container-run-invocation (oci-container-configuration->oci-container-invocation diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm index 87faf9255b..27ff87ca56 100644 --- a/gnu/services/cuirass.scm +++ b/gnu/services/cuirass.scm @@ -100,13 +100,19 @@ (group cuirass-configuration-group ;string (default "cuirass")) (interval cuirass-configuration-interval ;integer (seconds) - (default 60)) - (ttl cuirass-configuration-ttl ;integer + (default 300)) + (parallel-evaluations cuirass-configuration-parallel-evaluations + (default #f)) ;integer | #f + (ttl cuirass-configuration-ttl ;integer (default 2592000)) + (evaluation-ttl cuirass-configuration-evaluation-ttl + (default (* 24 30 24 3600))) ;integer (seconds) (build-expiry cuirass-configuration-build-expiry (default (* 4 30 24 3600))) ;integer(seconds) (threads cuirass-configuration-threads ;integer (default #f)) + (web-threads cuirass-configuration-web-threads ;integer | #f + (default #f)) (parameters cuirass-configuration-parameters ;string (default #f)) (remote-server cuirass-configuration-remote-server @@ -130,6 +136,14 @@ (define (cuirass-shepherd-service config) "Return a <shepherd-service> for the Cuirass service with CONFIG." + (define (endpoint name) + #~(endpoint (make-socket-address AF_UNIX + #$(in-vicinity "/var/run/cuirass" name)) + #:name #$name + #:socket-owner #$(cuirass-configuration-user config) + #:socket-group #$(cuirass-configuration-group config) + #:socket-directory-permissions #o700)) + (let ((cuirass (cuirass-configuration-cuirass config)) (cache-directory (cuirass-configuration-cache-directory config)) (web-log-file (cuirass-configuration-web-log-file config)) @@ -137,9 +151,12 @@ (user (cuirass-configuration-user config)) (group (cuirass-configuration-group config)) (interval (cuirass-configuration-interval config)) + (parallel-evaluations (cuirass-configuration-parallel-evaluations config)) (ttl (cuirass-configuration-ttl config)) + (evaluation-ttl (cuirass-configuration-evaluation-ttl config)) (build-expiry (cuirass-configuration-build-expiry config)) (threads (cuirass-configuration-threads config)) + (web-threads (cuirass-configuration-web-threads config)) (parameters (cuirass-configuration-parameters config)) (remote-server (cuirass-configuration-remote-server config)) (database (cuirass-configuration-database config)) @@ -158,19 +175,30 @@ (requirement '(user-processes guix-daemon postgres postgres-roles networking)) - (start #~(make-forkexec-constructor + (start #~(make-systemd-constructor (list (string-append #$cuirass "/bin/cuirass") "register" "--cache-directory" #$cache-directory "--specifications" #$config-file "--database" #$database "--interval" #$(number->string interval) + #$@(if parallel-evaluations + (list (string-append + "--parallel-evaluations=" + (number->string evaluation-ttl))) + '()) #$@(if ttl (list (string-append "--ttl=" (number->string ttl) "s")) '()) + #$@(if evaluation-ttl + (list (string-append + "--evaluation-ttl=" + (number->string evaluation-ttl) + "s")) + '()) #$@(if build-expiry (list (string-append "--build-expiry=" @@ -191,16 +219,21 @@ #$@(if fallback? '("--fallback") '()) #$@extra-options) + ;; Unix-domain sockets that trigger socket activation. + (list #$(endpoint "bridge") + #$(endpoint "remote-builds")) + #:environment-variables (list "LC_ALL=C.UTF-8" ;for proper file name decoding "GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt" + "COLUMNS=200" ;for backtraces (string-append "GIT_EXEC_PATH=" #$git "/libexec/git-core")) #:user #$user #:group #$group #:log-file #$main-log-file)) - (stop #~(make-kill-destructor)) + (stop #~(make-systemd-destructor)) (actions (list (shepherd-configuration-action config-file)))) ,(shepherd-service (documentation "Run Cuirass web interface.") @@ -219,6 +252,10 @@ "--database" #$database "--listen" #$host "--port" #$(number->string port) + #$@(if web-threads + (list #~(string-append "--threads=" + #$web-threads)) + '()) #$@(if parameters (list #~(string-append "--parameters=" #$parameters)) diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 12d3c3175c..76533b1a76 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2015 Andy Wingo <wingo@igalia.com> ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com> -;;; Copyright © 2017, 2020, 2022, 2023, 2025 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2017, 2020, 2022, 2023, 2025 Maxim Cournoyer <maxim@guixotic.coop> ;;; Copyright © 2017 Nikita <nikita@n0.is> ;;; Copyright © 2017, 2019 Hartmut Goebel <h.goebel@crazy-compilers.com> ;;; Copyright © 2018, 2020, 2022, 2025 Efraim Flashner <efraim@flashner.co.il> @@ -2229,7 +2229,8 @@ rules." (let ((plasma-plasma (plasma-package config))) (map (lambda (name) ((package-direct-input-selector name) plasma-plasma)) - '("plasma-desktop" + '("packagekit" ;for discover + "plasma-desktop" "plasma-workspace" "plasma-disks" "kdeplasma-addons" @@ -2246,7 +2247,8 @@ rules." (let ((plasma-plasma (plasma-package config))) (map (lambda (name) ((package-direct-input-selector name) plasma-plasma)) - '("plasma-desktop" + '("packagekit" ;for discover + "plasma-desktop" "plasma-workspace" "kactivitymanagerd" "plasma-disks" diff --git a/gnu/services/docker.scm b/gnu/services/docker.scm index 6abfbc49a0..b758a7f1ec 100644 --- a/gnu/services/docker.scm +++ b/gnu/services/docker.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018 Danny Milosavljevic <dannym@scratchpost.org> ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net> -;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim@guixotic.coop> ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2020 Jesse Dowell <jessedowell@gmail.com> ;;; Copyright © 2021 Brice Waegeneire <brice@waegenei.re> diff --git a/gnu/services/herd.scm b/gnu/services/herd.scm index 92b2463b33..06361ba49e 100644 --- a/gnu/services/herd.scm +++ b/gnu/services/herd.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016-2019, 2022-2023 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2017, 2020 Mathieu Othacehe <m.othacehe@gmail.com> -;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2023 Maxim Cournoyer <maxim@guixotic.coop> ;;; ;;; This file is part of GNU Guix. ;;; diff --git a/gnu/services/lightdm.scm b/gnu/services/lightdm.scm index b69cc21322..799ddecfe2 100644 --- a/gnu/services/lightdm.scm +++ b/gnu/services/lightdm.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019, 2020 L p R n d n <guix@lprndn.info> ;;; Copyright © 2020 Ricardo Wurmus <rekado@elephly.net> -;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2022 Maxim Cournoyer <maxim@guixotic.coop> ;;; ;;; This file is part of GNU Guix. ;;; diff --git a/gnu/services/linux.scm b/gnu/services/linux.scm index a0720f7073..90693b77eb 100644 --- a/gnu/services/linux.scm +++ b/gnu/services/linux.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2020 Maxim Cournoyer <maxim@guixotic.coop> ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re> ;;; Copyright © 2020, 2023 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2021 raid5atemyhomework <raid5atemyhomework@protonmail.com> @@ -651,10 +651,9 @@ placed in a udev rules file." (group vfs-mapping-group (default "users")) (name vfs-mapping-name - (default (string-append - (vfs-mapping-source this-record) "-[" - (vfs-mapping-policy this-record) "]->" - (vfs-mapping-destination this-record))) + (default (format #f "~a-on-~a" + (vfs-mapping-policy this-record) + (vfs-mapping-destination this-record))) (thunked)) (requirement vfs-mapping-requirement (default '(file-systems user-homes)))) diff --git a/gnu/services/mcron.scm b/gnu/services/mcron.scm index 0e0d07d252..68d02ef4d7 100644 --- a/gnu/services/mcron.scm +++ b/gnu/services/mcron.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016-2020, 2023 Ludovic Courtès <ludo@gnu.org> -;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2022 Maxim Cournoyer <maxim@guixotic.coop> ;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu> ;;; ;;; This file is part of GNU Guix. diff --git a/gnu/services/messaging.scm b/gnu/services/messaging.scm index 4cfac3bc3a..59a79e7307 100644 --- a/gnu/services/messaging.scm +++ b/gnu/services/messaging.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2015, 2017-2020, 2022-2024 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2018 Pierre-Antoine Rouby <contact@parouby.fr> -;;; Copyright © 2025 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2025 Maxim Cournoyer <maxim@guixotic.coop> ;;; Copyright © 2024 Evgeny Pisemsky <mail@pisemsky.site> ;;; ;;; This file is part of GNU Guix. diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index c5ebb1b673..b0d1c74490 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -10,7 +10,7 @@ ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com> ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net> ;;; Copyright © 2019 Florian Pelz <pelzflorian@pelzflorian.de> -;;; Copyright © 2019, 2021, 2024, 2025 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2019, 2021, 2024, 2025 Maxim Cournoyer <maxim@guixotic.coop> ;;; Copyright © 2019 Sou Bunnbu <iyzsong@member.fsf.org> ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com> ;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re> @@ -1484,7 +1484,10 @@ project's documentation} for more information." ,(file-union "network-manager-configuration-directory" extra-configuration-files) "/etc/NetworkManager/conf.d")) - '())))) + '()) + ;; Ensure "/etc/ipsec.secrets" exists, which is required by the + ;; nm-l2tp plugin. + (mkdir-p "/etc/ipsec.secrets")))) (define (vpn-plugin-directory plugins) "Return a directory containing PLUGINS, the NM VPN plugins." @@ -3000,15 +3003,17 @@ of the IPFS peer-to-peer storage network."))) (keepalived keepalived-configuration-keepalived ;file-like (default keepalived)) (config-file keepalived-configuration-config-file ;file-like - (default #f))) + (default #f)) + (shepherd-requirement keepalived-configuration-shepherd-requirement + (default '(networking user-processes)))) (define (keepalived-shepherd-service config) (match-record config <keepalived-configuration> - (keepalived config-file) + (keepalived config-file shepherd-requirement) (list (shepherd-service (provision '(keepalived)) (documentation "Run keepalived.") - (requirement '(loopback)) + (requirement shepherd-requirement) (start #~(make-forkexec-constructor (list (string-append #$keepalived "/sbin/keepalived") "--dont-fork" "--log-console" "--log-detail" diff --git a/gnu/services/nfs.scm b/gnu/services/nfs.scm index f5a1c6a44e..a5e35db6a3 100644 --- a/gnu/services/nfs.scm +++ b/gnu/services/nfs.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 John Darrington <jmd@gnu.org> ;;; Copyright © 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net> -;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2020, 2021 Maxim Cournoyer <maxim@guixotic.coop> ;;; ;;; This file is part of GNU Guix. ;;; diff --git a/gnu/services/rsync.scm b/gnu/services/rsync.scm index 6f658a4b65..96adf94dac 100644 --- a/gnu/services/rsync.scm +++ b/gnu/services/rsync.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com> ;;; Copyright © 2021, 2023, 2025 Ludovic Courtès <ludo@gnu.org> -;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2023 Maxim Cournoyer <maxim@guixotic.coop> ;;; ;;; This file is part of GNU Guix. ;;; diff --git a/gnu/services/sddm.scm b/gnu/services/sddm.scm index 92d64cc599..d8d14b5af3 100644 --- a/gnu/services/sddm.scm +++ b/gnu/services/sddm.scm @@ -235,6 +235,9 @@ Relogin=" (if (sddm-configuration-relogin? config) (arguments (list "sha512" "shadow" "try_first_pass"))))) (session (list + (pam-entry + (control "required") + (module "pam_env.so")) ;load /etc/environment in new sessions ;; lfs has a required pam_limits.so ;; should be factored out into system-session (pam-entry diff --git a/gnu/services/sound.scm b/gnu/services/sound.scm index 23f92f6bee..97520815de 100644 --- a/gnu/services/sound.scm +++ b/gnu/services/sound.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2018, 2020 Oleg Pykhalov <go.wigust@gmail.com> ;;; Copyright © 2020 Liliana Marie Prikler <liliana.prikler@gmail.com> ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> -;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2022 Maxim Cournoyer <maxim@guixotic.coop> ;;; Copyright © 2025 Roman Scherer <roman@burningswell.com> ;;; ;;; This file is part of GNU Guix. diff --git a/gnu/services/telephony.scm b/gnu/services/telephony.scm index 423e007871..4b28881718 100644 --- a/gnu/services/telephony.scm +++ b/gnu/services/telephony.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 nee <nee-git@hidamari.blue> -;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim@guixotic.coop> ;;; ;;; This file is part of GNU Guix. ;;; diff --git a/gnu/services/virtualization.scm b/gnu/services/virtualization.scm index 14007e740d..f774f01143 100644 --- a/gnu/services/virtualization.scm +++ b/gnu/services/virtualization.scm @@ -7,7 +7,7 @@ ;;; Copyright © 2022 Leo Nikkilä <hello@lnikki.la> ;;; Copyright © 2023 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2024 Raven Hallsby <karl@hallsby.com> -;;; Copyright © 2025 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2025 Maxim Cournoyer <maxim@guixotic.coop> ;;; Copyright © 2025 Nigko Yerden <nigko.yerden@gmail.com> ;;; ;;; This file is part of GNU Guix. @@ -61,6 +61,7 @@ #:use-module (guix packages) #:use-module (guix records) #:use-module (guix store) + #:use-module (guix ui) #:use-module (guix utils) #:autoload (guix self) (make-config.scm) #:autoload (guix platform) (platform-system) @@ -83,6 +84,7 @@ hurd-vm-configuration? hurd-vm-configuration-os hurd-vm-configuration-qemu + hurd-vm-configuration-type hurd-vm-configuration-image hurd-vm-configuration-disk-size hurd-vm-configuration-memory-size @@ -1782,6 +1784,11 @@ preventing password-based authentication as 'root'." (inherit config) (authorize-key? #f)))))))) +(define (sanitize-hurd-vm-configuration-type value) + (unless (memq value '(hurd-qcow2 hurd64-qcow2)) + (leave (G_ "hurd-vm: '~a' is not a valid type~%") value)) + value) + (define-record-type* <hurd-vm-configuration> hurd-vm-configuration make-hurd-vm-configuration hurd-vm-configuration? @@ -1789,6 +1796,9 @@ preventing password-based authentication as 'root'." (default %hurd-vm-operating-system)) (qemu hurd-vm-configuration-qemu ;file-like (default qemu-minimal)) + (type hurd-vm-configuration-type ;symbol + (default 'hurd-qcow2) + (sanitize sanitize-hurd-vm-configuration-type)) (image hurd-vm-configuration-image ;<image> (thunked) (default (hurd-vm-disk-image this-record))) @@ -1825,7 +1835,8 @@ is added to the OS specified in CONFIG." (let* ((os (transform (hurd-vm-configuration-os config))) (disk-size (hurd-vm-configuration-disk-size config)) - (type (lookup-image-type-by-name 'hurd-qcow2)) + (type (lookup-image-type-by-name + (hurd-vm-configuration-type config))) (os->image (image-type-constructor type))) (image (inherit (os->image os)) (size disk-size)))) diff --git a/gnu/services/vnc.scm b/gnu/services/vnc.scm index 2cfa4d90e5..58e1a0ed43 100644 --- a/gnu/services/vnc.scm +++ b/gnu/services/vnc.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2022 Maxim Cournoyer <maxim@guixotic.coop> ;;; ;;; This file is part of GNU Guix. ;;; diff --git a/gnu/services/vpn.scm b/gnu/services/vpn.scm index 56022ac27a..1acd7dd588 100644 --- a/gnu/services/vpn.scm +++ b/gnu/services/vpn.scm @@ -11,7 +11,7 @@ ;;; Copyright © 2021 Nathan Dehnel <ncdehnel@gmail.com> ;;; Copyright © 2022 Cameron V Chaparro <cameron@cameronchaparro.com> ;;; Copyright © 2022 Timo Wilken <guix@twilken.net> -;;; Copyright © 2023 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2023 Maxim Cournoyer <maxim@guixotic.coop> ;;; Copyright © 2024 Richard Sent <richard@freakingpenguin.com> ;;; Copyright © 2025 Carlo Zancanaro <carlo@zancanaro.id.au> ;;; diff --git a/gnu/services/web.scm b/gnu/services/web.scm index d08122353f..d12257690c 100644 --- a/gnu/services/web.scm +++ b/gnu/services/web.scm @@ -204,26 +204,6 @@ hpcguix-web-configuration? hpcguix-web-service-type - tailon-configuration-file - tailon-configuration-file? - tailon-configuration-file-files - tailon-configuration-file-bind - tailon-configuration-file-relative-root - tailon-configuration-file-allow-transfers? - tailon-configuration-file-follow-names? - tailon-configuration-file-tail-lines - tailon-configuration-file-allowed-commands - tailon-configuration-file-debug? - tailon-configuration-file-http-auth - tailon-configuration-file-users - - tailon-configuration - tailon-configuration? - tailon-configuration-config-file - tailon-configuration-package - - tailon-service-type - anonip-configuration anonip-configuration? anonip-configuration-anonip @@ -907,7 +887,12 @@ of index files." (modules `((ice-9 match) ,@%default-modules)) (start (nginx-action "-p" run-directory)) - (stop (nginx-action "-s" "stop")) + + ;; Instead of invoking "nginx -s stop", use + ;; 'make-kill-destructor', which waits for the main process to + ;; actually terminate. + (stop #~(make-kill-destructor)) + (actions (list (shepherd-configuration-action config-file) @@ -1350,153 +1335,6 @@ a webserver.") ;;; -;;; Tailon -;;; - -(define-record-type* <tailon-configuration-file> - tailon-configuration-file make-tailon-configuration-file - tailon-configuration-file? - (files tailon-configuration-file-files - (default '("/var/log"))) - (bind tailon-configuration-file-bind - (default "localhost:8080")) - (relative-root tailon-configuration-file-relative-root - (default #f)) - (allow-transfers? tailon-configuration-file-allow-transfers? - (default #t)) - (follow-names? tailon-configuration-file-follow-names? - (default #t)) - (tail-lines tailon-configuration-file-tail-lines - (default 200)) - (allowed-commands tailon-configuration-file-allowed-commands - (default '("tail" "grep" "awk"))) - (debug? tailon-configuration-file-debug? - (default #f)) - (wrap-lines tailon-configuration-file-wrap-lines - (default #t)) - (http-auth tailon-configuration-file-http-auth - (default #f)) - (users tailon-configuration-file-users - (default #f))) - -(define (tailon-configuration-files-string files) - (string-append - "\n" - (string-join - (map - (lambda (x) - (string-append - " - " - (cond - ((string? x) - (simple-format #f "'~A'" x)) - ((list? x) - (string-join - (cons (simple-format #f "'~A':" (car x)) - (map - (lambda (x) (simple-format #f " - '~A'" x)) - (cdr x))) - "\n")) - (else (error x))))) - files) - "\n"))) - -(define-gexp-compiler (tailon-configuration-file-compiler - (file <tailon-configuration-file>) system target) - (match file - (($ <tailon-configuration-file> files bind relative-root - allow-transfers? follow-names? - tail-lines allowed-commands debug? - wrap-lines http-auth users) - (text-file - "tailon-config.yaml" - (string-concatenate - (filter-map - (match-lambda - ((key . #f) #f) - ((key . value) (string-append key ": " value "\n"))) - - `(("files" . ,(tailon-configuration-files-string files)) - ("bind" . ,bind) - ("relative-root" . ,relative-root) - ("allow-transfers" . ,(if allow-transfers? "true" "false")) - ("follow-names" . ,(if follow-names? "true" "false")) - ("tail-lines" . ,(number->string tail-lines)) - ("commands" . ,(string-append "[" - (string-join allowed-commands ", ") - "]")) - ("debug" . ,(if debug? "true" #f)) - ("wrap-lines" . ,(if wrap-lines "true" "false")) - ("http-auth" . ,http-auth) - ("users" . ,(if users - (string-concatenate - (cons "\n" - (map (match-lambda - ((user . pass) - (string-append - " " user ":" pass))) - users))) - #f))))))))) - -(define-record-type* <tailon-configuration> - tailon-configuration make-tailon-configuration - tailon-configuration? - (config-file tailon-configuration-config-file - (default (tailon-configuration-file))) - (package tailon-configuration-package - (default tailon))) - -(define tailon-shepherd-service - (match-lambda - (($ <tailon-configuration> config-file package) - (list (shepherd-service - (provision '(tailon)) - (requirement '(user-processes)) - (documentation "Run the tailon daemon.") - (start #~(make-forkexec-constructor - `(,(string-append #$package "/bin/tailon") - "-c" ,#$config-file) - #:user "tailon" - #:group "tailon")) - (stop #~(make-kill-destructor))))))) - -(define %tailon-accounts - (list (user-group (name "tailon") (system? #t)) - (user-account - (name "tailon") - (group "tailon") - (system? #t) - (comment "tailon") - (home-directory "/var/empty") - (shell (file-append shadow "/sbin/nologin"))))) - -(define tailon-service-type - (service-type - (name 'tailon) - (description - "Run Tailon, a Web application for monitoring, viewing, and searching log -files.") - (extensions - (list (service-extension shepherd-root-service-type - tailon-shepherd-service) - (service-extension account-service-type - (const %tailon-accounts)))) - (compose concatenate) - (extend (lambda (parameter files) - (tailon-configuration - (inherit parameter) - (config-file - (let ((old-config-file - (tailon-configuration-config-file parameter))) - (tailon-configuration-file - (inherit old-config-file) - (files (append (tailon-configuration-file-files old-config-file) - files)))))))) - (default-value (tailon-configuration)))) - - - -;;; ;;; Log anonymization ;;; diff --git a/gnu/services/xorg.scm b/gnu/services/xorg.scm index d5d7ffbc4c..b32a960bcf 100644 --- a/gnu/services/xorg.scm +++ b/gnu/services/xorg.scm @@ -12,7 +12,7 @@ ;;; Copyright © 2021 Oleg Pykhalov <go.wigust@gmail.com> ;;; Copyright © 2021 Josselin Poiret <josselin.poiret@protonmail.ch> ;;; Copyright © 2022 Chris Marusich <cmmarusich@gmail.com> -;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2022 Maxim Cournoyer <maxim@guixotic.coop> ;;; Copyright © 2023 muradm <mail@muradm.net> ;;; Copyright © 2024 Zheng Junjie <873216071@qq.com> ;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz> |