aboutsummaryrefslogtreecommitdiff
path: root/gnu/services
diff options
context:
space:
mode:
authorOleg Pykhalov <go.wigust@gmail.com>2024-06-02 11:01:57 +0300
committerOleg Pykhalov <go.wigust@gmail.com>2024-06-02 18:04:34 +0300
commitbc06affabcf68bbe93e9afee13bef8cc8c6336a2 (patch)
tree73c61bd892facb6a7281f6eb34ef202b9d9cf97a /gnu/services
parenteac5171246da875f5996621c5329c833fd85b891 (diff)
downloadguix-bc06affabcf68bbe93e9afee13bef8cc8c6336a2.tar.gz
guix-bc06affabcf68bbe93e9afee13bef8cc8c6336a2.zip
services: nix: Fix activation.
This commit follows 797be0ea5c3703ad96acd32c98dca5f946cf5c95. 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
Diffstat (limited to 'gnu/services')
-rw-r--r--gnu/services/nix.scm10
1 files changed, 6 insertions, 4 deletions
diff --git a/gnu/services/nix.scm b/gnu/services/nix.scm
index 419e5968fe..9749fc9e0f 100644
--- a/gnu/services/nix.scm
+++ b/gnu/services/nix.scm
@@ -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"))))