aboutsummaryrefslogtreecommitdiff
path: root/tests/home-services.scm
blob: e13733cabd9fd18e674de8d43c4c690cd6fb9172 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2022 Ludovic Courtès <ludo@gnu.org>
;;;
;;; 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 <http://www.gnu.org/licenses/>.

(define-module (test-home-services)
  #:use-module (gnu services)
  #:use-module (gnu home services)
  #:use-module (guix diagnostics)
  #:use-module (srfi srfi-1)
  #:use-module (srfi srfi-64)
  #:use-module (ice-9 match))

(test-begin "home-services")

(test-assert "fold-home-service-types"
  (match (fold-home-service-types cons '())
    (() #f)
    (lst (and (every service-type? lst)
              (every (lambda (type)
                       (let ((location (service-type-location type)))
                         (string-contains (location-file location)
                                          "gnu/home")))
                     lst)))))

(test-eq "lookup-service-types"
  home-files-service-type
  (and (null? (lookup-home-service-types 'does-not-exist-at-all))
       (match (lookup-home-service-types 'home-files)
         ((one) one)
         (x x))))

(test-end)
:42 +0200'>2020-09-17guix-install.sh: Support OpenRC....* etc/guix-install.sh (chk_init_sys): Detect OpenRC. (sys_enable_guix_daemon): Install & enable the Guix daemon on such systems. * etc/openrc/guix-daemon.in: New file. * nix/local.mk: Add a rule for it. (openrcservicedir, nodist_openrcservice_DATA): New variables. (CLEANFILES, EXTRA_DIST): Add them. * .gitignore: Ignore etc/openrc/guix-daemon. Signed-off-by: Tobias Geerinckx-Rice <me@tobias.gr> Morgan Smith 2020-07-17gitignore: Don't ignore daemon source code....Remove files that are included in the repository from .gitignore. This improves the behavior of some code-searching tools. Jakub Kądziołka 2020-06-28.gitignore: Ignore 'etc/committer.scm'....* .gitignore: Add '/etc/committer.scm'. Brice Waegeneire 2020-05-16etc: Add a systemd unit to bind-mount @storedir@ read-only....* etc/gnu-store.mount.in: New file. * nix/local.mk (nodist_systemdservice_DATA): Add it. (etc/%.mount): New rule for it. * etc/guix-install.sh (sys_enable_guix_daemon): Install it. * doc/guix.texi (Binary Installation): Document it. * .gitignore: Ignore changes to it. Tobias Geerinckx-Rice 2020-05-14etc: indent-code.el: Use the --quick option....This prevents Emacs from loading the autoload definitions found in its profile, which needlessly clutters the output. It also prevents Geiser (if installed) from blocking the script and asking the user to input the Scheme implementation to use. The trick for passing multiple arguments to Emacs is to use what is called a "sesquicolon" (see https://www.emacswiki.org/emacs/EmacsScripts). * etc/indent-code.el.in: Rename to... * etc/indent-code.el: ...this. Adapt the shebang to use a sesquicolon, and pass the --quick option to Emacs. Since this line is interpreted by the shell, simply use Emacs from the PATH instead of from a hard coded location. (main): New procedure, used as the entry point. * configure.ac: Remove the warning about Emacs. Emacs can now be installed any time by the user if they want to use the script. * .gitignore: No longer ignore changes to etc/indent-code.el. Maxim Cournoyer 2020-03-30.gitignore: Ignore test results in tests/services....This is a follow-up to commit d3e439e355284f136ff13eb3e6fffb4661552f3b. * .gitignore: Add /tests/services/*.trs. Marius Bakke 2020-03-11Add system start-up files for guix-daemon....* etc/init.d/guix-daemon.in: New file. * nix/local.mk (etc/init.d/guix-daemon): New rule. (nodist_sysvinitservice_DATA): Add etc/init.d/guix-daemon.in . (CLEANFILES): Add etc/init.d/guix-daemon . * .gitignore: Add etc/init.d/guix-daemon . Danny Milosavljevic