diff options
Diffstat (limited to 'gnu/system')
| -rw-r--r-- | gnu/system/file-systems.scm | 47 | ||||
| -rw-r--r-- | gnu/system/install.scm | 6 | ||||
| -rw-r--r-- | gnu/system/shadow.scm | 2 | ||||
| -rw-r--r-- | gnu/system/vm.scm | 3 |
4 files changed, 36 insertions, 22 deletions
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm index ece8fb41e67..003eb443d15 100644 --- a/gnu/system/file-systems.scm +++ b/gnu/system/file-systems.scm | |||
| @@ -37,6 +37,7 @@ | |||
| 37 | file-system-options | 37 | file-system-options |
| 38 | file-system-check? | 38 | file-system-check? |
| 39 | file-system-create-mount-point? | 39 | file-system-create-mount-point? |
| 40 | file-system-dependencies | ||
| 40 | 41 | ||
| 41 | file-system->spec | 42 | file-system->spec |
| 42 | string->uuid | 43 | string->uuid |
| @@ -97,7 +98,10 @@ | |||
| 97 | (check? file-system-check? ; Boolean | 98 | (check? file-system-check? ; Boolean |
| 98 | (default #t)) | 99 | (default #t)) |
| 99 | (create-mount-point? file-system-create-mount-point? ; Boolean | 100 | (create-mount-point? file-system-create-mount-point? ; Boolean |
| 100 | (default #f))) | 101 | (default #f)) |
| 102 | (dependencies file-system-dependencies ; list of strings (mount | ||
| 103 | ; points depended on) | ||
| 104 | (default '()))) | ||
| 101 | 105 | ||
| 102 | (define-inlinable (file-system-needed-for-boot? fs) | 106 | (define-inlinable (file-system-needed-for-boot? fs) |
| 103 | "Return true if FS has the 'needed-for-boot?' flag set, or if it's the root | 107 | "Return true if FS has the 'needed-for-boot?' flag set, or if it's the root |
| @@ -153,8 +157,10 @@ UUID representation." | |||
| 153 | ((_ str) | 157 | ((_ str) |
| 154 | (string? (syntax->datum #'str)) | 158 | (string? (syntax->datum #'str)) |
| 155 | ;; A literal string: do the conversion at expansion time. | 159 | ;; A literal string: do the conversion at expansion time. |
| 156 | (with-syntax ((bv (string->uuid (syntax->datum #'str)))) | 160 | (let ((bv (string->uuid (syntax->datum #'str)))) |
| 157 | #''bv)) | 161 | (unless bv |
| 162 | (syntax-violation 'uuid "invalid UUID" s)) | ||
| 163 | (datum->syntax #'str bv))) | ||
| 158 | ((_ str) | 164 | ((_ str) |
| 159 | #'(string->uuid str))))) | 165 | #'(string->uuid str))))) |
| 160 | 166 | ||
| @@ -231,21 +237,26 @@ UUID representation." | |||
| 231 | (flags '(read-only bind-mount)))) | 237 | (flags '(read-only bind-mount)))) |
| 232 | 238 | ||
| 233 | (define %control-groups | 239 | (define %control-groups |
| 234 | (cons (file-system | 240 | (let ((parent (file-system |
| 235 | (device "cgroup") | 241 | (device "cgroup") |
| 236 | (mount-point "/sys/fs/cgroup") | 242 | (mount-point "/sys/fs/cgroup") |
| 237 | (type "tmpfs") | 243 | (type "tmpfs") |
| 238 | (check? #f)) | 244 | (check? #f)))) |
| 239 | (map (lambda (subsystem) | 245 | (cons parent |
| 240 | (file-system | 246 | (map (lambda (subsystem) |
| 241 | (device "cgroup") | 247 | (file-system |
| 242 | (mount-point (string-append "/sys/fs/cgroup/" subsystem)) | 248 | (device "cgroup") |
| 243 | (type "cgroup") | 249 | (mount-point (string-append "/sys/fs/cgroup/" subsystem)) |
| 244 | (check? #f) | 250 | (type "cgroup") |
| 245 | (options subsystem) | 251 | (check? #f) |
| 246 | (create-mount-point? #t))) | 252 | (options subsystem) |
| 247 | '("cpuset" "cpu" "cpuacct" "memory" "devices" "freezer" | 253 | (create-mount-point? #t) |
| 248 | "blkio" "perf_event" "hugetlb")))) | 254 | |
| 255 | ;; This must be mounted after, and unmounted before the | ||
| 256 | ;; parent directory. | ||
| 257 | (dependencies (list parent)))) | ||
| 258 | '("cpuset" "cpu" "cpuacct" "memory" "devices" "freezer" | ||
| 259 | "blkio" "perf_event" "hugetlb"))))) | ||
| 249 | 260 | ||
| 250 | (define %base-file-systems | 261 | (define %base-file-systems |
| 251 | ;; List of basic file systems to be mounted. Note that /proc and /sys are | 262 | ;; List of basic file systems to be mounted. Note that /proc and /sys are |
diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 359d1265e50..e7e5d4ae9d1 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm | |||
| @@ -75,6 +75,7 @@ under /root/.guix-profile where GUIX is installed." | |||
| 75 | (with-directory-excursion %root | 75 | (with-directory-excursion %root |
| 76 | (zero? (system* "tar" "--xz" "--format=gnu" | 76 | (zero? (system* "tar" "--xz" "--format=gnu" |
| 77 | "--owner=root:0" "--group=root:0" | 77 | "--owner=root:0" "--group=root:0" |
| 78 | "--mtime=@0" ;for files in /var/guix | ||
| 78 | "--check-links" | 79 | "--check-links" |
| 79 | "-cvf" #$output | 80 | "-cvf" #$output |
| 80 | ;; Avoid adding / and /var to the tarball, | 81 | ;; Avoid adding / and /var to the tarball, |
| @@ -273,8 +274,9 @@ You have been warned. Thanks for being so brave. | |||
| 273 | (guix-service #:authorize-hydra-key? #t) | 274 | (guix-service #:authorize-hydra-key? #t) |
| 274 | 275 | ||
| 275 | ;; Start udev so that useful device nodes are available. | 276 | ;; Start udev so that useful device nodes are available. |
| 276 | ;; Use device-mapper rules for cryptsetup & co. | 277 | ;; Use device-mapper rules for cryptsetup & co; enable the CRDA for |
| 277 | (udev-service #:rules (list lvm2)) | 278 | ;; regulations-compliant WiFi access. |
| 279 | (udev-service #:rules (list lvm2 crda)) | ||
| 278 | 280 | ||
| 279 | ;; Add the 'cow-store' service, which users have to start manually | 281 | ;; Add the 'cow-store' service, which users have to start manually |
| 280 | ;; since it takes the installation directory as an argument. | 282 | ;; since it takes the installation directory as an argument. |
diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm index ae6229229b3..f0331096140 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm | |||
| @@ -156,7 +156,7 @@ fi | |||
| 156 | # Adjust the prompt depending on whether we're in 'guix environment'. | 156 | # Adjust the prompt depending on whether we're in 'guix environment'. |
| 157 | if [ -n \"$GUIX_ENVIRONMENT\" ] | 157 | if [ -n \"$GUIX_ENVIRONMENT\" ] |
| 158 | then | 158 | then |
| 159 | export PS1='\\u@\\h \\w\\ [env]$ ' | 159 | export PS1='\\u@\\h \\w [env]\\$ ' |
| 160 | else | 160 | else |
| 161 | export PS1='\\u@\\h \\w\\$ ' | 161 | export PS1='\\u@\\h \\w\\$ ' |
| 162 | fi | 162 | fi |
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 2520493e2e6..b2930091272 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm | |||
| @@ -493,7 +493,8 @@ exec " #$qemu "/bin/" #$(qemu-command (%current-system)) | |||
| 493 | #~(" -kernel " #$(operating-system-kernel os) "/bzImage \ | 493 | #~(" -kernel " #$(operating-system-kernel os) "/bzImage \ |
| 494 | -initrd " #$os-drv "/initrd \ | 494 | -initrd " #$os-drv "/initrd \ |
| 495 | -append \"" #$(if graphic? "" "console=ttyS0 ") | 495 | -append \"" #$(if graphic? "" "console=ttyS0 ") |
| 496 | "--system=" #$os-drv " --load=" #$os-drv "/boot --root=/dev/vda1\" ")) | 496 | "--system=" #$os-drv " --load=" #$os-drv "/boot --root=/dev/vda1 " |
| 497 | (string-join (list #+@(operating-system-kernel-arguments os))) "\" ")) | ||
| 497 | #$(common-qemu-options image | 498 | #$(common-qemu-options image |
| 498 | (map file-system-mapping-source | 499 | (map file-system-mapping-source |
| 499 | (cons %store-mapping mappings))) | 500 | (cons %store-mapping mappings))) |
