From mboxrd@z Thu Jan 1 00:00:00 1970 From: Damien Cassou Subject: bug#39968: nix-service-type doesn't work because of missing gcroots Date: Sat, 07 Mar 2020 08:58:37 +0100 Message-ID: <87d09ok34i.fsf@cassou.me> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:43486) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAUMR-0006e5-HY for bug-guix@gnu.org; Sat, 07 Mar 2020 02:59:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jAUMQ-0002jg-BH for bug-guix@gnu.org; Sat, 07 Mar 2020 02:59:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:40229) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jAUMQ-0002hy-7n for bug-guix@gnu.org; Sat, 07 Mar 2020 02:59:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jAUMQ-0001La-62 for bug-guix@gnu.org; Sat, 07 Mar 2020 02:59:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:43025) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAUM9-0006df-Lx for bug-guix@gnu.org; Sat, 07 Mar 2020 02:58:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jAUM8-0001H8-AH for bug-guix@gnu.org; Sat, 07 Mar 2020 02:58:45 -0500 Received: from mail.choca.pics ([2001:910:1410:500::1]:53712) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jAUM8-0000yU-4Y for bug-guix@gnu.org; Sat, 07 Mar 2020 02:58:44 -0500 Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id 7A301181929EE for ; Sat, 7 Mar 2020 08:58:40 +0100 (CET) Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10032) with ESMTP id k-XA8VSo4eIZ for ; Sat, 7 Mar 2020 08:58:39 +0100 (CET) Received: from localhost (localhost.localdomain [IPv6:::1]) by mail.choca.pics (Postfix) with ESMTP id B91A7181929E8 for ; Sat, 7 Mar 2020 08:58:39 +0100 (CET) Received: from mail.choca.pics ([IPv6:::1]) by localhost (mail.choca.pics [IPv6:::1]) (amavisd-new, port 10026) with ESMTP id 2DVE2qxTw8RM for ; Sat, 7 Mar 2020 08:58:39 +0100 (CET) Received: from luz4 (176-140-37-135.abo.bbox.fr [176.140.37.135]) by mail.choca.pics (Postfix) with ESMTPSA id 6BF6518192B26 for ; Sat, 7 Mar 2020 08:58:39 +0100 (CET) List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane-mx.org@gnu.org Sender: "bug-Guix" To: 39968@debbugs.gnu.org Hi, I'm trying to install Nix in a Guix System VM. The Guix manual for the nix-service-type says to run /run/current-system/profile/etc/profile.d/nix.sh but the script complains that /nix/var/nix/gcroots/per-user/cassou doesn't exist. I've added both the Nix service type and the Nix package to my configuration. After building the VM and starting it, I see a /nix/ folder, this is good. The Guix manual says to add a channel so I followed the steps of the Nix manual (https://nixos.org/nix/manual/#sec-channels) as normal user: $ nix-channel --add https://nixos.org/channels/nixpkgs-unstable $ nix-channel --update $ nix-env -u error: expected JSON value (use '--show-trace' to show detailed location information) $ echo $? 1 Passing --show-trace reveals a long stack strace saying that callPackageWith failed in nixpkgs/lib/customisation.nix. So I tried with the nixos-20.03 channel instead of the nixpkgs-unstable and I managed to get nix-env -u to not complain. The Guix manual then asks to do: $ ln -s "/nix/var/nix/profiles/per-user/$USER/profile" ~/.nix-profile $ source /run/current-system/profile/etc/profile.d/nix.sh mkdir: cannot create directory /nix/var/nix/gcroots/per-user/cassou: permission denied stat: cannot stat /nix/var/nix/gcroots/per-user/cassou: No such file or directory Nix: WARNING: bad ownership on /nix/var/nix/gcroots/per-user/cassou, should be 1000 It seems /nix/var/nix/gcroots/per-user exists but the folder is empty. Best -- Damien Cassou "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill