From 9c976474465f055f0b3ceb7877a53ae1cad22613 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 12 Oct 2022 13:37:59 +0200 Subject: system: Use a valid license as the dummy license. * gnu/system/images/wsl2.scm (dummy-package)[license]: Do not use #F. --- gnu/system/images/wsl2.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gnu/system/images') diff --git a/gnu/system/images/wsl2.scm b/gnu/system/images/wsl2.scm index 15cb4f69b8..80c2e775b4 100644 --- a/gnu/system/images/wsl2.scm +++ b/gnu/system/images/wsl2.scm @@ -33,6 +33,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)) @@ -113,7 +114,7 @@ USER." (home-page #f) (synopsis #f) (description #f) - (license #f))) + (license (fsdg-compatible "dummy")))) (define dummy-bootloader (bootloader -- cgit 1.4.1 From ec9326f021e37aa6ae97d6bab0c39f44f24cd11b Mon Sep 17 00:00:00 2001 From: Gabriel Wicki Date: Wed, 23 Nov 2022 10:41:56 +0100 Subject: system: images: Add networking support to pine64 image. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/system/images/pine64.scm (pine64-barebones-os) [services]: Add dhcp-client-service-type and ntp-service-type to the list of services. [packages]: Add nss-certs to the list of packages. Signed-off-by: 宋文武 --- gnu/system/images/pine64.scm | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'gnu/system/images') 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 +;;; Copyright © 2022 Gabriel Wicki ;;; ;;; 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 -- cgit 1.4.1 From c50cd1bbece27097456242f246f89c053e7cc1a2 Mon Sep 17 00:00:00 2001 From: dan Date: Wed, 9 Nov 2022 04:05:53 +0800 Subject: images: wsl2: Create XDG_RUNTIME_DIR on first login. * gnu/system/images/wsl2.scm (wsl-boot-program): Create XDG_RUNTIME_DIR on first login and set it. Signed-off-by: Mathieu Othacehe --- gnu/system/images/wsl2.scm | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'gnu/system/images') diff --git a/gnu/system/images/wsl2.scm b/gnu/system/images/wsl2.scm index 80c2e775b4..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 ;;; Copyright © 2022 Mathieu Othacehe +;;; Copyright © 2022 dan ;;; ;;; This file is part of GNU Guix. ;;; @@ -75,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")) @@ -88,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)))))) -- cgit 1.4.1