diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2023-01-30 11:33:18 +0200 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2023-01-30 12:39:40 +0200 |
commit | 4cf1acc7f3033b50b0bf19e02c9f522d522d338c (patch) | |
tree | 9fd64956ee60304c15387eb394cd649e49f01467 /gnu/system/images | |
parent | edb8c09addd186d9538d43b12af74d6c7aeea082 (diff) | |
parent | 595b53b74e3ef57a1c0c96108ba86d38a170a241 (diff) | |
download | guix-4cf1acc7f3033b50b0bf19e02c9f522d522d338c.tar.gz |
Merge remote-tracking branch 'origin/master' into core-updates
Conflicts: doc/guix.texi gnu/local.mk gnu/packages/admin.scm gnu/packages/base.scm gnu/packages/chromium.scm gnu/packages/compression.scm gnu/packages/databases.scm gnu/packages/diffoscope.scm gnu/packages/freedesktop.scm gnu/packages/gnome.scm gnu/packages/gnupg.scm gnu/packages/guile.scm gnu/packages/inkscape.scm gnu/packages/llvm.scm gnu/packages/openldap.scm gnu/packages/pciutils.scm gnu/packages/ruby.scm gnu/packages/samba.scm gnu/packages/sqlite.scm gnu/packages/statistics.scm gnu/packages/syndication.scm gnu/packages/tex.scm gnu/packages/tls.scm gnu/packages/version-control.scm gnu/packages/xml.scm guix/build-system/copy.scm guix/scripts/home.scm
Diffstat (limited to 'gnu/system/images')
-rw-r--r-- | gnu/system/images/pine64.scm | 21 | ||||
-rw-r--r-- | gnu/system/images/wsl2.scm | 18 |
2 files changed, 29 insertions, 10 deletions
diff --git a/gnu/system/images/pine64.scm b/gnu/system/images/pine64.scm index a2d471b802..3feb69764d 100644 --- a/gnu/system/images/pine64.scm +++ b/gnu/system/images/pine64.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com> +;;; Copyright © 2022 Gabriel Wicki <gabriel@erlikon.ch> ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,9 +22,11 @@ #:use-module (gnu bootloader u-boot) #:use-module (gnu image) #:use-module (gnu packages linux) + #:use-module (gnu packages certs) #:use-module (guix platforms arm) #:use-module (gnu services) #:use-module (gnu services base) + #:use-module (gnu services networking) #:use-module (gnu system) #:use-module (gnu system file-systems) #:use-module (gnu system image) @@ -47,13 +50,17 @@ (mount-point "/") (type "ext4")) %base-file-systems)) - (services (cons (service agetty-service-type - (agetty-configuration - (extra-options '("-L")) ; no carrier detect - (baud-rate "115200") - (term "vt100") - (tty "ttyS0"))) - %base-services)))) + (services (cons* + (service agetty-service-type + (agetty-configuration + (extra-options '("-L")) ; no carrier detect + (baud-rate "115200") + (term "vt100") + (tty "ttyS0"))) + (service dhcp-client-service-type) + (service ntp-service-type) + %base-services)) + (packages (cons nss-certs %base-packages)))) (define pine64-image-type (image-type diff --git a/gnu/system/images/wsl2.scm b/gnu/system/images/wsl2.scm index 15cb4f69b8..d9aaa1a271 100644 --- a/gnu/system/images/wsl2.scm +++ b/gnu/system/images/wsl2.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2022 Alex Griffin <a@ajgrf.com> ;;; Copyright © 2022 Mathieu Othacehe <othacehe@gnu.org> +;;; Copyright © 2022 dan <i@dan.games> ;;; ;;; This file is part of GNU Guix. ;;; @@ -33,6 +34,7 @@ #:use-module (guix build-system trivial) #:use-module (guix gexp) #:use-module (guix packages) + #:use-module ((guix licenses) #:select (fsdg-compatible)) #:export (wsl-boot-program wsl-os wsl2-image)) @@ -74,7 +76,11 @@ USER." (let* ((pw (getpw #$user)) (shell (passwd:shell pw)) (sudo #+(file-append sudo "/bin/sudo")) - (args (cdr (command-line)))) + (args (cdr (command-line))) + (uid (passwd:uid pw)) + (gid (passwd:gid pw)) + (runtime-dir (string-append "/run/user/" + (number->string uid)))) ;; Save the value of $PATH set by WSL. Useful for finding ;; Windows binaries to run with WSL's binfmt interop. (setenv "WSLPATH" (getenv "PATH")) @@ -87,9 +93,15 @@ USER." MS_REMOUNT #:update-mtab? #f) + ;; Create XDG_RUNTIME_DIR for the login user. + (unless (file-exists? runtime-dir) + (mkdir runtime-dir) + (chown runtime-dir uid gid)) + (setenv "XDG_RUNTIME_DIR" runtime-dir) + ;; Start login shell as user. (apply execl sudo "sudo" - "--preserve-env=WSLPATH" + "--preserve-env=WSLPATH,XDG_RUNTIME_DIR" "-u" #$user "--" shell "-l" args)))))) @@ -113,7 +125,7 @@ USER." (home-page #f) (synopsis #f) (description #f) - (license #f))) + (license (fsdg-compatible "dummy")))) (define dummy-bootloader (bootloader |