mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
services: nix: Fix activation.
This commit follows 797be0ea5c
.
Reported by kiasoc5 <kiasoc5@disroot.org> at
<https://lists.gnu.org/archive/html/help-guix/2024-05/msg00185.html>.
* gnu/services/nix.scm (nix-activation): Avoid provisioning the store if it
already exists.
Change-Id: I159e8af5d7bd6ce62857b356d6e9ac68fe16acf4
This commit is contained in:
parent
eac5171246
commit
bc06affabc
1 changed files with 6 additions and 4 deletions
|
@ -98,12 +98,14 @@ (define (nix-activation _)
|
|||
#~(begin
|
||||
(use-modules (guix build utils)
|
||||
(srfi srfi-26))
|
||||
(for-each (cut mkdir-p <>) '("/nix/store" "/nix/var/log"
|
||||
(for-each (cut mkdir-p <>) '("/nix/var/log"
|
||||
"/nix/var/nix/gcroots/per-user"
|
||||
"/nix/var/nix/profiles/per-user"))
|
||||
(chown "/nix/store"
|
||||
(passwd:uid (getpw "root")) (group:gid (getpw "nixbld01")))
|
||||
(chmod "/nix/store" #o775)
|
||||
(unless (file-exists? #$%nix-store-directory)
|
||||
(mkdir-p #$%nix-store-directory)
|
||||
(chown #$%nix-store-directory
|
||||
(passwd:uid (getpw "root")) (group:gid (getpw "nixbld01")))
|
||||
(chmod #$%nix-store-directory #o775))
|
||||
(for-each (cut chmod <> #o777) '("/nix/var/nix/profiles"
|
||||
"/nix/var/nix/profiles/per-user"))))
|
||||
|
||||
|
|
Loading…
Reference in a new issue