From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: removing items from %desktop-services Date: Wed, 16 May 2018 11:44:52 +0300 Message-ID: <20180516084452.GB1239@macbook41> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="HG+GLK89HZ1zG0kk" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43292) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fIs3Q-0007QU-5L for help-guix@gnu.org; Wed, 16 May 2018 04:45:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fIs3M-0004go-TE for help-guix@gnu.org; Wed, 16 May 2018 04:45:00 -0400 Received: from flashner.co.il ([178.62.234.194]:39468) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fIs3M-0004gR-HF for help-guix@gnu.org; Wed, 16 May 2018 04:44:56 -0400 Received: from localhost (46-117-130-5.bb.netvision.net.il [46.117.130.5]) by flashner.co.il (Postfix) with ESMTPSA id 6469440184 for ; Wed, 16 May 2018 08:44:55 +0000 (UTC) Content-Disposition: inline List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: help-guix@gnu.org --HG+GLK89HZ1zG0kk Content-Type: multipart/mixed; boundary="vGgW1X5XWziG23Ko" Content-Disposition: inline --vGgW1X5XWziG23Ko Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I'm trying to modify the list of services in my os-config, and I've run into a bit of a problem. I've replaced my ntp-service with an openntpd-service, but I'm having trouble with the syntax for removing more services. Here's a snippet: (use-modules (srfi srfi-1) (modify-services (delete (ntp-service) %desktop-services) ;(modify-services (fold delete %desktop-services ; '( ; (screen-locker-service slock) ; (screen-locker-service xlockmore "xlock") ; (ntp-service) ; ) The uncommented out code works and deletes (ntp-service) from %desktop-servies as expected. When I comment that line out and put in the multi-line version with fold then I find out that it doesn't work, as evidenced by the error that I have two services providing ntpd (ntp and openntpd). I know I can put (modify-services (delete (service) (delete (other-service) (delete (third-service) %desktop-services))) but I'd rather do it more cleanly with `fold' or something similar. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --vGgW1X5XWziG23Ko Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="macbook41_config.scm" (use-modules (guix store) (gnu) (gnu system nss) (gnu system locale) (srfi srfi-1)) (use-service-modules admin cups desktop mcron networking pm ssh xorg) (use-package-modules bootloaders certs cups gnome linux video) (define %btrfs-scrub #~(job '(next-hour '(3)) (string-append #$btrfs-progs "/bin/btrfs scrub -c 3 start /"))) (define %btrfs-balance #~(job '(next-hour '(5)) (string-append #$btrfs-progs "/bin/btrfs balance start -dusage=50 -musage=70 /"))) (define my-xorg-modules ;; Only the modules on this laptop (fold delete %default-xorg-modules '("xf86-video-ati" "xf86-video-cirrus" "xf86-video-mach64" "xf86-video-nouveau" "xf86-video-nv" "xf86-video-sis" "xf86-input-evdev" "xf86-input-keyboard" "xf86-input-mouse" "xf86-input-synaptics" ))) (operating-system (host-name "macbook41") (timezone "Asia/Jerusalem") (locale "en_US.utf8") (locale-definitions (list (locale-definition (source "en_US") (name "en_US.utf8")) (locale-definition (source "he_IL") (name "he_IL.utf8")))) ;; Assuming /dev/sdX is the target hard disk, and "my-root" ;; is the label of the target root file system. (bootloader (bootloader-configuration (bootloader grub-efi-bootloader) (target "/boot/efi"))) (kernel-arguments '("zswap.enabled=1" ;; Required to run X32 software and VMs ;; https://wiki.debian.org/X32Port ;; Still untested on GuixSD. "syscall.x32=y")) (file-systems (cons* (file-system (device "my-root") (mount-point "/") (type "btrfs") (title 'label) (options "autodefrag,compress=lzo,discard,ssd_spread")) (file-system (device "none") (mount-point "/var/guix/temproots") (title 'device) (type "tmpfs") (check? #f)) (file-system (device (uuid "F010-1913" 'fat)) (title 'uuid) (mount-point "/boot/efi") (type "vfat")) %base-file-systems)) (swap-devices '("/dev/sda2")) (users (cons (user-account (name "efraim") (comment "Efraim") (group "users") (supplementary-groups '("wheel" "netdev" "kvm" "lp" "lpadmin" "audio" "video")) (home-directory "/home/efraim")) %base-user-accounts)) ;; This is where we specify system-wide packages. (packages (cons* nss-certs ;for HTTPS access gvfs ;for user mounts cups btrfs-progs libvdpau-va-gl ;intel graphics vdpau %base-packages)) (services (cons* (service enlightenment-desktop-service-type) (console-keymap-service "il-heb") (service guix-publish-service-type (guix-publish-configuration (port 3000))) (service openssh-service-type (openssh-configuration (port-number 22) (allow-empty-passwords? #f) (password-authentication? #t))) (tor-service) (tor-hidden-service "http" '((22 "127.0.0.1:22"))) (service cups-service-type (cups-configuration (web-interface? #t) (extensions (list cups-filters hplip)))) (service tlp-service-type) (service rottlog-service-type) (service mcron-service-type (mcron-configuration (jobs (list %btrfs-scrub %btrfs-balance)))) (service openntpd-service-type (openntpd-configuration (listen-on '("127.0.0.1" "::1")) (allow-large-adjustment? #t))) (modify-services (delete (ntp-service) %desktop-services) ;(modify-services (fold delete %desktop-services ; '( ; (screen-locker-service slock) ; (screen-locker-service xlockmore "xlock") ; (ntp-service) ; ) ; ) (guix-service-type config => (guix-configuration (inherit config) (substitute-urls (cons* ;"https://bayfront.guixsd.org" ; currently offline "https://berlin.guixsd.org" ;"http://192.168.1.134:8181" ; odroid-c2 "http://192.168.1.183" ; E1240 %default-substitute-urls)) (extra-options '("--cores=1")))) ; we're on a laptop (slim-service-type config => (slim-configuration (inherit config) (startx (xorg-start-command #:modules my-xorg-modules)))) ))) ;; Allow resolution of '.local' host names with mDNS. (name-service-switch %mdns-host-lookup-nss)) --vGgW1X5XWziG23Ko-- --HG+GLK89HZ1zG0kk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAlr774AACgkQQarn3Mo9 g1HY5w/+J85KzOfXNttAgAlZVmLpE1I6VUPDStoX0dboOnpYFKwS4RzbVgv5eqJ9 jFOW/DahUahcOIehWT3yhuuCYtK0UVVHH7nPfVSl/81yu587gPIh+9jXdxG7WD29 qFOkrfupBCypaKwbBXI4qhwIpTq3WhBMa5pMOVRENsbzsKIuMAUufFGz/y4A0fFl qpVSR3zr9L3UhCvjeBopGisGvop+llSFihiD9NlN6WC0K+8SpQE2G8gpU5YUaSBE ERB2JSnTmfo0ft9AoBv6gDylHXyQDpqRc/b76k5KI1Dlo3JokZx7xlntTyzPiCEt 3E4OUtXuWMBpky8sZuFRnJ9aYPW2aJzBG+4fblrvOPFbcuV1lRhUS00Xaqa2vt57 f9JtRTWERMlLYevGRc6103ov4q6nrPCEoQ6cwc4k3QGYaA49zo3WcOztRM759U0t UeDC/EeoB4FMeYl6BLfn5/8PKdW5ceDy7ZFLsrUYyvtNi7angFfci7Fa3CroMKta HBQM5vMAq/zXBFCLasCu5bn8oVo/KX1RHgVrbGXLW5Ol1k4TnPwSkqyNqq2OA0XZ Z3XZYjW5o9moOlO1ah1eBRv/wWrWwbJ5zWOZI0Qjjm35HOPGBQs2gpEVTprsCkHC 2i2lzZQ9p88uww5EAnIaoBCJaAWqegr0k5IBq7AEf/xG97ljQ7w= =ZPtB -----END PGP SIGNATURE----- --HG+GLK89HZ1zG0kk--