From 45eac6cdf5c8d9d7b0c564b105c790d2d2007799 Mon Sep 17 00:00:00 2001 From: Brice Waegeneire Date: Thu, 23 Apr 2020 14:00:02 +0200 Subject: services: Add file system utilities to profile. * gnu/services/base.scm (file-system-type->utilities) (file-system-utilities): New procedures. (file-system-service-type): Extend 'profile-service-type' with 'file-system-utilities'. * gnu/system.scm (boot-file-system-service): New procedure. (operating-system-default-essential-services): Use it. (%base-packages): Remove 'e2fsprogs'. Signed-off-by: Maxim Cournoyer Modified-by: Maxim Cournoyer --- gnu/system.scm | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) (limited to 'gnu/system.scm') diff --git a/gnu/system.scm b/gnu/system.scm index a94f0a9a1f..66ca629d63 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -575,6 +575,14 @@ marked as 'needed-for-boot'." (service file-system-service-type (map add-dependencies file-systems))) +(define (boot-file-system-service os) + "Return a service which adds, to the system profile, packages providing the +utilites for the file systems marked as 'needed-for-boot' in OS." + (let ((file-systems (filter file-system-needed-for-boot? + (operating-system-file-systems os)))) + (simple-service 'boot-file-system-utilities profile-service-type + (file-system-utilities file-systems)))) + (define (mapped-device-users device file-systems) "Return the subset of FILE-SYSTEMS that use DEVICE." (let ((targets (map (cut string-append "/dev/mapper/" <>) @@ -720,13 +728,14 @@ bookkeeping." (define known-fs (map file-system-mount-point (operating-system-file-systems os))) - (let* ((mappings (device-mapping-services os)) - (root-fs (root-file-system-service)) - (other-fs (non-boot-file-system-service os)) - (swaps (swap-services os)) - (procs (service user-processes-service-type)) - (host-name (host-name-service (operating-system-host-name os))) - (entries (operating-system-directory-base-entries os))) + (let* ((mappings (device-mapping-services os)) + (root-fs (root-file-system-service)) + (boot-fs (boot-file-system-service os)) + (non-boot-fs (non-boot-file-system-service os)) + (swaps (swap-services os)) + (procs (service user-processes-service-type)) + (host-name (host-name-service (operating-system-host-name os))) + (entries (operating-system-directory-base-entries os))) (cons* (service system-service-type entries) (service linux-builder-service-type (linux-builder-configuration @@ -757,7 +766,7 @@ bookkeeping." (operating-system-setuid-programs os)) (service profile-service-type (operating-system-packages os)) - other-fs + boot-fs non-boot-fs (append mappings swaps ;; Add the firmware service. @@ -887,8 +896,9 @@ of PROVENANCE-SERVICE-TYPE to its services." iw wireless-tools)) (define %base-packages-disk-utilities - ;; A well-rounded set of packages for interacting with disks, partitions - ;; and filesystems. + ;; A well-rounded set of packages for interacting with disks, + ;; partitions and filesystems, included with the Guix installation + ;; image. (list parted gptfdisk ddrescue ;; We used to provide fdisk from GNU fdisk, but as of version 2.0.0a ;; it pulls Guile 1.8, which takes unreasonable space; furthermore @@ -903,8 +913,7 @@ of PROVENANCE-SERVICE-TYPE to its services." (define %base-packages ;; Default set of packages globally visible. It should include anything ;; required for basic administrator tasks. - (append (list e2fsprogs) - %base-packages-artwork + (append %base-packages-artwork %base-packages-interactive %base-packages-linux %base-packages-networking -- cgit v1.2.3 From f78cfcd7d3f1f76a5c09c21d76b14983d8428c4d Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 10 Oct 2022 22:22:16 -0400 Subject: system: operating-system: Make the timezone field default to Etc/UTC. * gnu/system.scm () [timezone]: Default to "Etc/UTC". --- gnu/system.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gnu/system.scm') diff --git a/gnu/system.scm b/gnu/system.scm index 66ca629d63..b7f19d741a 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -265,7 +265,8 @@ VERSION is the target version of the boot-parameters record." (packages operating-system-packages ; list of (PACKAGE OUTPUT...) (default %base-packages)) ; or just PACKAGE - (timezone operating-system-timezone) ; string + (timezone operating-system-timezone + (default "Etc/UTC")) ; string (locale operating-system-locale ; string (default "en_US.utf8")) (locale-definitions operating-system-locale-definitions ; list of -- cgit v1.2.3 From 3fb3bd3da530a5f82a169b1fa451474f9d90c3b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 23 Oct 2022 12:20:55 +0200 Subject: system: hurd: Boot with the statically-linked 'exec' server. This works around . * gnu/system.scm (hurd-multiboot-modules): Use '/hurd/exec.static' instead of 'ld.so /hurd/exec'. --- gnu/system.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gnu/system.scm') diff --git a/gnu/system.scm b/gnu/system.scm index b7f19d741a..f92c7de8e3 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -1492,8 +1492,14 @@ a list of , to populate the \"old entries\" menu." (cross-libc target)) glibc)) (exec-server-command - (list (file-append libc "/lib/ld.so.1") "exec" - (file-append hurd "/hurd/exec") "'$(exec-task=task-create)'"))) + ;; XXX: Run the statically-linked 'exec' to work around + ;; , which manifests on some + ;; machines. + + ;; (list (file-append libc "/lib/ld.so.1") "exec" + ;; (file-append hurd "/hurd/exec") "'$(exec-task=task-create)'") + (list (file-append hurd "/hurd/exec.static") "exec" + "'$(exec-task=task-create)'"))) (list root-file-system-command exec-server-command))) (define* (operating-system-boot-parameters os root-device -- cgit v1.2.3 From d3e982dccbd8ec7e00a2ab3efa04bef8f1c16b9e Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Sun, 23 Oct 2022 16:25:36 -0700 Subject: gnu: Fix typos. * gnu/packages/emacs-xyz.scm (emacs-piem)[description]: Fix use of "This packages". * gnu/packages/tex.scm (texlive-hardwrap)[description]: Fix spelling of "arbitrary". * gnu/packages/cran.scm (r-shinymanager)[description]: Fix spelling of "authentication". * gnu/packages/lisp-xyz.scm (sbcl-utils-kt)[description]: Fix spelling of "developed". * gnu/packages/crates-io.scm (rust-fs-utils-1)[description]: Fix spelling of "filesystem". [synopsis]: Likewise. * gnu/packages/haxe.scm (neko)[description]: Fix spelling of "functions". * gnu/packages/animation.scm (swftools)[description]: Fix needless pluralization of "information". * gnu/packages/lisp-xyz.scm (sbcl-slot-extra-options)[description]: Fix spelling of "inheritance". * gnu/packages/emacs-xyz.scm (emacs-js-comint)[description]: Fix spelling of "interpreter". * gnu/packages/coq.scm (coq-mathcomp-finmap)[description]: Fix spelling of "library". * gnu/services/lightdm.scm (lightdm-configuration): Fix spelling of "mechanism". * gnu/packages/emacs-xyz.scm (emacs-citar-org-roam)[synopsis]: Fix spelling of "package". * gnu/packages/games.scm (freerct)[description]: Fix spelling of "responsibilities". * gnu/packages/statistics.scm (r-mixedpower)[description]: Fix spelling of "separate". * gnu/packages/accessibility.scm (espeakup)[description]: Fix spelling of "speech". * gnu/packages/bioinformatics.scm (r-skitools)[synopsis]: Fix spelling of "utilities". * gnu/packages/golang.scm (go-github-com-savsgio-gotils)[synopsis]: Fix spelling of "utilities". [description]: Likewise. * gnu/system.scm (boot-file-system-service os): Fix spelling of "utilities". --- gnu/system.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/system.scm') diff --git a/gnu/system.scm b/gnu/system.scm index f92c7de8e3..3478afcec4 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -578,7 +578,7 @@ marked as 'needed-for-boot'." (define (boot-file-system-service os) "Return a service which adds, to the system profile, packages providing the -utilites for the file systems marked as 'needed-for-boot' in OS." +utilities for the file systems marked as 'needed-for-boot' in OS." (let ((file-systems (filter file-system-needed-for-boot? (operating-system-file-systems os)))) (simple-service 'boot-file-system-utilities profile-service-type -- cgit v1.2.3 From 1603c78aa4657d9f6e3b7cf1daace40043ff3e9a Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 28 Nov 2022 13:57:58 -0500 Subject: system: Rename and move %base-packages-disk-utilities. Rationale: It is only used in INSTALLATION-OS and doesn't make sense to be used in another context, given that file systems now automatically pull their dependencies since commit 45eac6cdf5c8d9d7b0c564b105c790d2d2007799 (services: Add file system utilities to profile). * gnu/system.scm (%base-packages-disk-utilities): Deprecate and rename to... * gnu/system/install.scm (%installer-disk-utilities): ... this. (installation-os) [packages]: Adjust accordingly. --- gnu/system.scm | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'gnu/system.scm') diff --git a/gnu/system.scm b/gnu/system.scm index 3478afcec4..1c119c31b6 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -38,6 +38,7 @@ #:use-module (guix gexp) #:use-module (guix records) #:use-module (guix packages) + #:use-module (guix deprecation) #:use-module (guix derivations) #:use-module (guix profiles) #:use-module ((guix utils) #:select (substitute-keyword-arguments)) @@ -49,9 +50,6 @@ #:use-module (gnu packages bash) #:use-module (gnu packages compression) #:use-module (gnu packages cross-base) - #:use-module (gnu packages cryptsetup) - #:use-module (gnu packages disk) - #:use-module (gnu packages file-systems) #:use-module (gnu packages firmware) #:use-module (gnu packages gawk) #:use-module (gnu packages guile) @@ -896,20 +894,7 @@ of PROVENANCE-SERVICE-TYPE to its services." ;; many people are familiar with, so keep it around. iw wireless-tools)) -(define %base-packages-disk-utilities - ;; A well-rounded set of packages for interacting with disks, - ;; partitions and filesystems, included with the Guix installation - ;; image. - (list parted gptfdisk ddrescue - ;; We used to provide fdisk from GNU fdisk, but as of version 2.0.0a - ;; it pulls Guile 1.8, which takes unreasonable space; furthermore - ;; util-linux's fdisk is already available, in %base-packages-linux. - cryptsetup mdadm - dosfstools - btrfs-progs - f2fs-tools - jfsutils - xfsprogs)) +(define-deprecated %base-packages-disk-utilities #f '()) (define %base-packages ;; Default set of packages globally visible. It should include anything -- cgit v1.2.3 From bb689fda925430d99e911a7613085fc24300dca3 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Mon, 28 Nov 2022 14:10:14 -0500 Subject: system: Add e2fsprogs to %base-packages-utils. Rationale: Even when not using an ext file system, the utilities provided by e2fsprogs are useful, for example to set the copy-on-write attribute of a Btrfs file system. * gnu/system.scm (%base-packages-utils): Add e2fsprogs. --- gnu/system.scm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gnu/system.scm') diff --git a/gnu/system.scm b/gnu/system.scm index 1c119c31b6..62c8e0c2b6 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -856,6 +856,8 @@ of PROVENANCE-SERVICE-TYPE to its services." (cons* procps psmisc which (@ (gnu packages admin) shadow-with-man-pages) ;for 'passwd' + e2fsprogs ;for lsattr, chattr, etc. + guile-3.0-latest ;; The packages below are also in %FINAL-INPUTS, so take them from -- cgit v1.2.3 From 086df6ef213d44d4b75c263033552eef6b2bd868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 27 Dec 2022 21:52:59 +0100 Subject: system: Define default 'PS1' in /etc/bashrc rather than ~/.bashrc. Users can override 'PS1' in ~/.bashrc if they wish. Previously, on Guix Home, the "default" 'PS1' would be set in ~/.bashrc when 'home-bash-configuration-guix-defaults?' is true, preventing users from overriding it via the 'environment-variables' field of 'home-bash-extension'. * gnu/system/shadow.scm (%default-bashrc): Remove 'PS1' setting. * gnu/system.scm (operating-system-etc-service): Define PS1 in /etc/bashrc. * gnu/home/services/shells.scm (add-bash-configuration): When 'home-bash-configuration-guix-defaults?' is true, add a default 'PS1' to ~/.bash_profile. --- gnu/system.scm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gnu/system.scm') diff --git a/gnu/system.scm b/gnu/system.scm index 62c8e0c2b6..d67f9a615b 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -1047,6 +1047,9 @@ fi (bashrc (plain-file "bashrc" "\ # Bash-specific initialization. +# Provide a default prompt. The user's ~/.bashrc can override it. +PS1='\\u@\\h \\w${GUIX_ENVIRONMENT:+ [env]}\\$ ' + # The 'bash-completion' package. if [ -f /run/current-system/profile/etc/profile.d/bash_completion.sh ] then -- cgit v1.2.3