diff options
author | Ludovic Courtès <ludo@gnu.org> | 2014-02-02 01:34:33 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2014-02-02 01:34:33 +0100 |
commit | f6a9d0484c6cdd1554f6ce0e7372ec8b7f2a52ca (patch) | |
tree | 6e42090d0b19817a8e328be70ad88a29187933e5 /gnu/system.scm | |
parent | 92cb2e28884ab6ecc5c113ef54eb5aeebae9bb2b (diff) | |
download | guix-f6a9d0484c6cdd1554f6ce0e7372ec8b7f2a52ca.tar.gz |
gnu: vm: Add /run/current-system and /bin/sh.
* gnu/system/vm.scm (operating-system-default-contents): Populate /run/current-system and create /bin/sh. * gnu/system.scm (operating-system-profile-derivation, operating-system-profile-directory): New procedures. (operating-system-derivation): Use it.
Diffstat (limited to 'gnu/system.scm')
-rw-r--r-- | gnu/system.scm | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/gnu/system.scm b/gnu/system.scm index afea976165..514e67ab9a 100644 --- a/gnu/system.scm +++ b/gnu/system.scm @@ -49,6 +49,7 @@ operating-system-locale operating-system-services + operating-system-profile-directory operating-system-derivation)) ;;; Commentary: @@ -284,6 +285,17 @@ alias ll='ls -l' ("pam.d" ,pam.d)) #:name "etc"))) +(define (operating-system-profile-derivation os) + "Return a derivation that builds the default profile of OS." + ;; TODO: Replace with a real profile with a manifest. + (union (operating-system-packages os) + #:name "default-profile")) + +(define (operating-system-profile-directory os) + "Return the directory name of the default profile of OS." + (mlet %store-monad ((drv (operating-system-profile-derivation os))) + (return (derivation->output-path drv)))) + (define (operating-system-derivation os) "Return a derivation that builds OS." (mlet* %store-monad @@ -310,11 +322,8 @@ alias ll='ls -l' services)))) (groups -> (append (operating-system-groups os) (append-map service-user-groups services))) - (packages -> (operating-system-packages os)) - ;; TODO: Replace with a real profile with a manifest. - (profile-drv (union packages - #:name "default-profile")) + (profile-drv (operating-system-profile-derivation os)) (profile -> (derivation->output-path profile-drv)) (etc-drv (etc-directory #:accounts accounts #:groups groups #:pam-services pam-services |