diff options
| author | Rutherther <rutherther@ditigal.xyz> | 2025-12-16 12:15:12 +0100 |
|---|---|---|
| committer | Rutherther <rutherther@ditigal.xyz> | 2025-12-22 23:00:45 +0100 |
| commit | 105dbf7deec8599b2175bb3a6798ce726ece0154 (patch) | |
| tree | 4eb50947d61e7ff6ecfd0eec97fa51e54d5e220d /gnu/system/examples | |
| parent | d226cc49339df6c2c13fdb9c2149051f418212ee (diff) | |
vm-image.tmpl: Remove current-guix url override.
This simplifies things thanks to the release artifacts now, they have been
rewritten to Guile and can now supply current-guix-package as a parameter, as
was intended. That way the checkout is not leaked for the release artifacts.
* gnu/system/examples/vm-image.tmpl
(guix-package-commit): Remove variable.
(operating-system): Use (current-guix) directly.
* gnu/system/examples/vm-image-efi.tmpl: Likewise.
Change-Id: Iabf1bb5bbb86b9984bfb87ba0543782a6dce3192
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
Diffstat (limited to 'gnu/system/examples')
| -rw-r--r-- | gnu/system/examples/vm-image-efi.tmpl | 18 | ||||
| -rw-r--r-- | gnu/system/examples/vm-image.tmpl | 19 |
2 files changed, 3 insertions, 34 deletions
diff --git a/gnu/system/examples/vm-image-efi.tmpl b/gnu/system/examples/vm-image-efi.tmpl index 1bde66c2dd8..d264b27a5f4 100644 --- a/gnu/system/examples/vm-image-efi.tmpl +++ b/gnu/system/examples/vm-image-efi.tmpl | |||
| @@ -30,15 +30,6 @@ Run '\x1b[1;37minfo guix\x1b[0m' to browse documentation. | |||
| 30 | accounts.\x1b[0m | 30 | accounts.\x1b[0m |
| 31 | ")) | 31 | ")) |
| 32 | 32 | ||
| 33 | (define (guix-package-commit guix) | ||
| 34 | ;; Extract the commit of the GUIX package. | ||
| 35 | (match (package-source guix) | ||
| 36 | ((? channel? source) | ||
| 37 | (channel-commit source)) | ||
| 38 | (_ | ||
| 39 | (apply (lambda* (#:key commit #:allow-other-keys) commit) | ||
| 40 | (package-arguments guix))))) | ||
| 41 | |||
| 42 | (operating-system | 33 | (operating-system |
| 43 | (host-name "gnu") | 34 | (host-name "gnu") |
| 44 | (timezone "Etc/UTC") | 35 | (timezone "Etc/UTC") |
| @@ -148,14 +139,7 @@ root ALL=(ALL) ALL | |||
| 148 | (guix-service-type config => | 139 | (guix-service-type config => |
| 149 | (guix-configuration | 140 | (guix-configuration |
| 150 | (inherit config) | 141 | (inherit config) |
| 151 | (guix | 142 | (guix (current-guix)))))))) |
| 152 | (let ((guix (current-guix))) | ||
| 153 | (package | ||
| 154 | (inherit guix) | ||
| 155 | ;; Do not leak the local checkout URL. | ||
| 156 | (source (channel | ||
| 157 | (inherit %default-guix-channel) | ||
| 158 | (commit (guix-package-commit guix))))))))))))) | ||
| 159 | 143 | ||
| 160 | ;; Allow resolution of '.local' host names with mDNS. | 144 | ;; Allow resolution of '.local' host names with mDNS. |
| 161 | (name-service-switch %mdns-host-lookup-nss)) | 145 | (name-service-switch %mdns-host-lookup-nss)) |
diff --git a/gnu/system/examples/vm-image.tmpl b/gnu/system/examples/vm-image.tmpl index f7c27d23db8..2a0e9e21c84 100644 --- a/gnu/system/examples/vm-image.tmpl +++ b/gnu/system/examples/vm-image.tmpl | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | (srfi srfi-1) | 10 | (srfi srfi-1) |
| 11 | (ice-9 match) | 11 | (ice-9 match) |
| 12 | (guix channels) | 12 | (guix channels) |
| 13 | (gnu packages package-management) | ||
| 13 | (gnu system image)) | 14 | (gnu system image)) |
| 14 | (use-service-modules desktop mcron networking spice ssh xorg sddm) | 15 | (use-service-modules desktop mcron networking spice ssh xorg sddm) |
| 15 | (use-package-modules bootloaders fonts | 16 | (use-package-modules bootloaders fonts |
| @@ -30,15 +31,6 @@ Run '\x1b[1;37minfo guix\x1b[0m' to browse documentation. | |||
| 30 | accounts.\x1b[0m | 31 | accounts.\x1b[0m |
| 31 | ")) | 32 | ")) |
| 32 | 33 | ||
| 33 | (define (guix-package-commit guix) | ||
| 34 | ;; Extract the commit of the GUIX package. | ||
| 35 | (match (package-source guix) | ||
| 36 | ((? channel? source) | ||
| 37 | (channel-commit source)) | ||
| 38 | (_ | ||
| 39 | (apply (lambda* (#:key commit #:allow-other-keys) commit) | ||
| 40 | (package-arguments guix))))) | ||
| 41 | |||
| 42 | (operating-system | 34 | (operating-system |
| 43 | (host-name "gnu") | 35 | (host-name "gnu") |
| 44 | (timezone "Etc/UTC") | 36 | (timezone "Etc/UTC") |
| @@ -141,14 +133,7 @@ root ALL=(ALL) ALL | |||
| 141 | (guix-service-type config => | 133 | (guix-service-type config => |
| 142 | (guix-configuration | 134 | (guix-configuration |
| 143 | (inherit config) | 135 | (inherit config) |
| 144 | (guix | 136 | (guix (current-guix)))))))) |
| 145 | (let ((guix (current-guix))) | ||
| 146 | (package | ||
| 147 | (inherit guix) | ||
| 148 | ;; Do not leak the local checkout URL. | ||
| 149 | (source (channel | ||
| 150 | (inherit %default-guix-channel) | ||
| 151 | (commit (guix-package-commit guix))))))))))))) | ||
| 152 | 137 | ||
| 153 | ;; Allow resolution of '.local' host names with mDNS. | 138 | ;; Allow resolution of '.local' host names with mDNS. |
| 154 | (name-service-switch %mdns-host-lookup-nss)) | 139 | (name-service-switch %mdns-host-lookup-nss)) |
