diff options
Diffstat (limited to 'gnu/system/install.scm')
-rw-r--r-- | gnu/system/install.scm | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 0195a0804d..4de903c59b 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -1,10 +1,10 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014-2022 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2014-2022, 2024 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com> ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr> -;;; Copyright © 2020 Florian Pelz <pelzflorian@pelzflorian.de> +;;; Copyright © 2020, 2024 Florian Pelz <pelzflorian@pelzflorian.de> ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2022 Josselin Poiret <dev@jpoiret.xyz> ;;; Copyright © 2023 Herman Rimm <herman@rimm.ee> @@ -27,15 +27,13 @@ (define-module (gnu system install) #:use-module (gnu) #:use-module (gnu system) - #:use-module (gnu system setuid) + #:use-module (gnu system privilege) #:use-module (gnu bootloader u-boot) #:use-module (guix gexp) #:use-module (guix store) - #:use-module (guix monads) #:use-module (guix modules) #:use-module ((guix packages) #:select (package-version supported-package?)) #:use-module (guix platform) - #:use-module ((guix store) #:select (%store-prefix)) #:use-module (guix utils) #:use-module (gnu installer) #:use-module (gnu system locale) @@ -47,7 +45,6 @@ #:use-module (gnu packages admin) #:use-module (gnu packages bash) #:use-module (gnu packages bootloaders) - #:use-module (gnu packages certs) #:use-module (gnu packages compression) #:use-module (gnu packages cryptsetup) #:use-module (gnu packages disk) @@ -60,7 +57,6 @@ #:use-module (gnu packages texinfo) #:use-module (gnu packages xorg) #:use-module (ice-9 match) - #:use-module (srfi srfi-26) #:export (installation-os a20-olinuxino-lime-installation-os a20-olinuxino-lime2-emmc-installation-os @@ -100,7 +96,9 @@ ("en" . "System Installation") ("es" . "Instalación del sistema") ("fr" . "Installation du système") - ("ru" . "Установка системы"))) + ("pt_BR" . "Instalação do sistema") + ("ru" . "Установка системы") + ("zh_CN" . "系统安装"))) (define (log-to-info tty user) "Return a script that spawns the Info reader on the right section of the @@ -111,13 +109,22 @@ manual." (locale (cadr (command-line))) (language (string-take locale (string-index locale #\_))) + (with-region (string-take locale + (string-index + locale + (char-set #\. #\/ #\@)))) (infodir "/run/current-system/profile/share/info") - (per-lang (string-append infodir "/guix." language - ".info.gz")) - (file (if (file-exists? per-lang) - per-lang - (string-append infodir "/guix.info"))) + (per-lang (lambda (code) + (string-append infodir "/guix." code + ".info.gz"))) + (file ((@ (srfi srfi-1) find) file-exists? + (list (per-lang with-region) + (per-lang language) + (string-append infodir + "/guix.info.gz")))) (node (or (assoc-ref '#$%installation-node-names + with-region) + (assoc-ref '#$%installation-node-names language) "System Installation"))) (redirect-port tty (current-output-port)) @@ -540,8 +547,9 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m ;; We don't need setuid programs, except for 'passwd', which can be handy ;; if one is to allow remote SSH login to the machine being installed. - (setuid-programs (list (setuid-program - (program (file-append shadow "/bin/passwd"))))) + (privileged-programs (list (privileged-program + (program (file-append shadow "/bin/passwd")) + (setuid? #t)))) (pam-services ;; Explicitly allow for empty passwords. |