;; This is an operating system configuration for a VM image. ;; Modify it as you see fit and instantiate the changes by running: ;; ;; guix system reconfigure /etc/config.scm ;; (use-modules (gnu) (guix) (srfi srfi-1)) (use-service-modules desktop networking ssh xorg) (use-package-modules bootloaders certs fonts nvi package-management wget xorg) (define vm-image-motd (plain-file "motd" " \x1b[1;37mThis is the GNU system. Welcome!\x1b[0m This instance of Guix is a template for virtualized environments. You can reconfigure the whole system by adjusting /etc/config.scm and running: guix system reconfigure /etc/config.scm Run '\x1b[1;37minfo guix\x1b[0m' to browse documentation. \x1b[1;33mConsider setting a password for the 'root' and 'guest' \ accounts.\x1b[0m ")) (operating-system (host-name "gnu") (timezone "Etc/UTC") (locale "en_US.utf8") (keyboard-layout (keyboard-layout "us" "altgr-intl")) ;; Label for the GRUB boot menu. (label (string-append "GNU Guix " (package-version guix))) (firmware '()) ;; Below we assume /dev/vda is the VM's hard disk. ;; Adjust as needed. (bootloader (bootloader-configuration (bootloader grub-bootloader) (target "/dev/vda") (terminal-outputs '(console)))) (file-systems (cons (file-system (mount-point "/") (device "/dev/vda1") (type "ext4")) %base-file-systems)) (users (cons (user-account (name "guest") (comment "GNU Guix Live") (password "") ;no password (group "users") (supplementary-groups '("wheel" "netdev" "audio" "video"))) %base-user-accounts)) ;; Our /etc/sudoers file. Since 'guest' initially has an empty password, ;; allow for password-less sudo. (sudoers-file (plain-file "sudoers" "\ root ALL=(ALL) ALL %wheel ALL=NOPASSWD: ALL\n")) (packages (append (list font-bitstream-vera nss-certs nvi wget) %base-packages)) (services (append (list (service xfce-desktop-service-type) ;; Choose SLiM, which is lighter than the default GDM. (service slim-service-type (slim-configuration (auto-login? #t) (default-user "guest") (xorg-configuration (xorg-configuration (keyboard-layout keyboard-layout))))) ;; Uncomment the line below to add an SSH server. ;;(service openssh-service-type) ;; Use the DHCP client service rather than NetworkManager. (service dhcp-client-service-type)) ;; Remove GDM, ModemManager, NetworkManager, and wpa-supplicant, ;; which don't make sense in a VM. (remove (lambda (service) (let ((type (service-kind service))) (or (memq type (list gdm-service-type wpa-supplicant-service-type cups-pk-helper-service-type network-manager-service-type modem-manager-service-type)) (eq? 'network-manager-applet (service-type-name type))))) (modify-services %desktop-services (login-service-type config => (login-configuration (inherit config) (motd vm-image-motd))))))) ;; Allow resolution of '.local' host names with mDNS. (name-service-switch %mdns-host-lookup-nss)) b457f5d92a0b3e3f53121e17571b42c4'>tests: Replace texlive importer tests....* tests/texlive.scm (xml, sxml): Remove variables. ("fetch-sxml: returns SXML for valid XML", "sxml->package"): Remove tests. ("texlive->guix-package"): Add new test. Ricardo Wurmus 2021-03-06tests: do not hard code HTTP ports...Previously, test cases could fail if some process was listening at a hard-coded port. This patch eliminates most of these potential failures, by automatically assigning an unbound port. This should allow for building multiple guix trees in parallel outside a build container, though this is currently untested. The test "home-page: Connection refused" in tests/lint.scm still hardcodes port 9999, however. * guix/tests/http.scm (http-server-can-listen?): remove now unused procedure. (%http-server-port): default to port 0, meaning the OS will automatically choose a port. (open-http-server-socket): remove the false statement claiming this procedure is exported and also return the allocated port number. (%local-url): raise an error if the port is obviously unbound. (call-with-http-server): set %http-server-port to the allocated port while the thunk is called. * tests/derivations.scm: adjust test cases to use automatically assign a port. As there is no risk of a port conflict now, do not make any tests conditional upon 'http-server-can-listen?' anymore. * tests/elpa.scm: likewise. * tests/lint.scm: likewise, and add a TODO comment about a port that is still hard-coded. * tests/texlive.scm: likewise. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Maxime Devos 2020-01-17import: texlive: Avoid uses of '@@' in tests....* guix/import/texlive.scm (fetch-sxml, sxml->package): Export. * tests/texlive.scm <top level>: Call '%http-server-port'. ("fetch-sxml: returns SXML for valid XML"): Use 'with-http-server' and set 'current-http-proxy' instead of using 'mock'. ("sxml->package"): Remove use of '@@'. Ludovic Courtès