diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2024-12-13 23:37:03 +0100 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2025-01-16 22:32:11 +0100 |
| commit | 0aa45f18543552f2396414ab130dab40f8969d27 (patch) | |
| tree | 7e28f838a4689df6295e6860bc2e82cb8e04b315 /tests/home-import.scm | |
| parent | f68060a10182f4ff02eebaa2c426124eb92f97d8 (diff) | |
home: Define ‘%base-home-services’.
* gnu/home.scm (%base-home-services): New variable.
(<home-environment>)[services]: Change default to ‘%base-home-services’.
* guix/scripts/home/import.scm (manifest+configuration-files->code): Use
‘%base-home-services’ by default.
* tests/home-import.scm (match-home-environment-no-services)
(match-home-environment-transformations)
(match-home-environment-no-services-nor-packages)
(match-home-environment-bash-service)
(match-home-environment-bash-service-with-alias): Adjust accordingly.
* doc/he-config-bare-bones.scm: Use ‘%base-home-services’.
* doc/guix.texi (Declaring the Home Environment): Add index entry for
‘%base-home-services’.
Change-Id: Id95ede62b97a976aad138bfc4b63fc0bdf37c7de
Diffstat (limited to 'tests/home-import.scm')
| -rw-r--r-- | tests/home-import.scm | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/tests/home-import.scm b/tests/home-import.scm index 04b7b761569..57a3d62a72b 100644 --- a/tests/home-import.scm +++ b/tests/home-import.scm | |||
| @@ -115,7 +115,7 @@ corresponding file." | |||
| 115 | ('specifications->packages | 115 | ('specifications->packages |
| 116 | ('list "guile@2.0.9" "gcc:lib" "glibc@2.19"))) | 116 | ('list "guile@2.0.9" "gcc:lib" "glibc@2.19"))) |
| 117 | ('services | 117 | ('services |
| 118 | ('list))))) | 118 | ('append ('list) '%base-home-services))))) |
| 119 | 119 | ||
| 120 | (define-home-environment-matcher match-home-environment-transformations | 120 | (define-home-environment-matcher match-home-environment-transformations |
| 121 | ('begin | 121 | ('begin |
| @@ -131,7 +131,7 @@ corresponding file." | |||
| 131 | ('list (transform ('specification->package "guile@2.0.9")) | 131 | ('list (transform ('specification->package "guile@2.0.9")) |
| 132 | ('list ('specification->package "gcc") "lib") | 132 | ('list ('specification->package "gcc") "lib") |
| 133 | ('specification->package "glibc@2.19"))) | 133 | ('specification->package "glibc@2.19"))) |
| 134 | ('services ('list))))) | 134 | ('services ('append ('list) '%base-home-services))))) |
| 135 | 135 | ||
| 136 | (define-home-environment-matcher match-home-environment-no-services-nor-packages | 136 | (define-home-environment-matcher match-home-environment-no-services-nor-packages |
| 137 | ('begin | 137 | ('begin |
| @@ -143,7 +143,7 @@ corresponding file." | |||
| 143 | ('packages | 143 | ('packages |
| 144 | ('specifications->packages ('list))) | 144 | ('specifications->packages ('list))) |
| 145 | ('services | 145 | ('services |
| 146 | ('list))))) | 146 | ('append ('list) '%base-home-services))))) |
| 147 | 147 | ||
| 148 | (define-home-environment-matcher match-home-environment-bash-service | 148 | (define-home-environment-matcher match-home-environment-bash-service |
| 149 | ('begin | 149 | ('begin |
| @@ -157,13 +157,14 @@ corresponding file." | |||
| 157 | ('packages | 157 | ('packages |
| 158 | ('specifications->packages ('list))) | 158 | ('specifications->packages ('list))) |
| 159 | ('services | 159 | ('services |
| 160 | ('list ('service | 160 | (append ('list ('service |
| 161 | 'home-bash-service-type | 161 | 'home-bash-service-type |
| 162 | ('home-bash-configuration | 162 | ('home-bash-configuration |
| 163 | ('aliases ('quote ())) | 163 | ('aliases ('quote ())) |
| 164 | ('bashrc | 164 | ('bashrc |
| 165 | ('list ('local-file "/tmp/guix-config/.bashrc" | 165 | ('list ('local-file "/tmp/guix-config/.bashrc" |
| 166 | "bashrc")))))))))) | 166 | "bashrc")))))) |
| 167 | '%base-home-services))))) | ||
| 167 | 168 | ||
| 168 | (define-home-environment-matcher match-home-environment-bash-service-with-alias | 169 | (define-home-environment-matcher match-home-environment-bash-service-with-alias |
| 169 | ('begin | 170 | ('begin |
| @@ -177,15 +178,16 @@ corresponding file." | |||
| 177 | ('packages | 178 | ('packages |
| 178 | ('specifications->packages ('list))) | 179 | ('specifications->packages ('list))) |
| 179 | ('services | 180 | ('services |
| 180 | ('list ('service | 181 | ('append ('list ('service |
| 181 | 'home-bash-service-type | 182 | 'home-bash-service-type |
| 182 | ('home-bash-configuration | 183 | ('home-bash-configuration |
| 183 | ('aliases | 184 | ('aliases |
| 184 | ('quote (("grep" . "grep --exclude-from=\"$HOME/.grep-exclude\"") | 185 | ('quote (("grep" . "grep --exclude-from=\"$HOME/.grep-exclude\"") |
| 185 | ("ls" . "ls -p")))) | 186 | ("ls" . "ls -p")))) |
| 186 | ('bashrc | 187 | ('bashrc |
| 187 | ('list ('local-file "/tmp/guix-config/.bashrc" | 188 | ('list ('local-file "/tmp/guix-config/.bashrc" |
| 188 | "bashrc")))))))))) | 189 | "bashrc")))))) |
| 190 | '%base-home-services))))) | ||
| 189 | 191 | ||
| 190 | 192 | ||
| 191 | (test-assert "manifest->code: No services" | 193 | (test-assert "manifest->code: No services" |
