me
/
guix
Archived
1
0
Fork 0

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
master
Oleg Pykhalov 2024-06-02 11:01:57 +03:00
parent eac5171246
commit bc06affabc
No known key found for this signature in database
GPG Key ID: 167F8EA5001AFA9C
1 changed files with 6 additions and 4 deletions

View File

@ -98,12 +98,14 @@ GID."
#~(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"))))