From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id eH8rFPcgX2MLMgEAbAwnHQ (envelope-from ) for ; Mon, 31 Oct 2022 02:12:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id IBw3FPcgX2PaNAAA9RJhRA (envelope-from ) for ; Mon, 31 Oct 2022 02:12:23 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 051B615821 for ; Mon, 31 Oct 2022 02:12:22 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1opJLL-0001qc-Ih; Sun, 30 Oct 2022 21:11:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opJLK-0001qS-Qx for help-guix@gnu.org; Sun, 30 Oct 2022 21:11:58 -0400 Received: from mx0.riseup.net ([198.252.153.6]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1opJLI-0001hO-RS for help-guix@gnu.org; Sun, 30 Oct 2022 21:11:58 -0400 Received: from fews2.riseup.net (fews2-pn.riseup.net [10.0.1.84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.riseup.net", Issuer "R3" (not verified)) by mx0.riseup.net (Postfix) with ESMTPS id 4N0w963gCTz9s7N; Mon, 31 Oct 2022 01:11:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1667178714; bh=4X/BcEvFeA1PM5btAekHoypuUpOvf+OOsVcM9Gti2+A=; h=References:From:To:Cc:Subject:Date:In-reply-to:From; b=or6dfxli7kK2AvbT/c3n8tnhCsNF+vbOufNbujL9T3OEIkh5iiIonXrrBzwDA/0g3 4HMtx0usJ0OKSzIZychD7DJSflasl0+73ML63HC2dT/V8W8efVTmwPF3mppS3q17DA n3nHyjd8/K3liDv9/B81yQn8/Z60Q586MQ+RWf90= X-Riseup-User-ID: F449F2CDD8DA7F5155DB0CF7F8BC72352BE1C5D31405F7ACE589ADB75AE1A6AB Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews2.riseup.net (Postfix) with ESMTPSA id 4N0w955qrrz20cj; Mon, 31 Oct 2022 01:11:53 +0000 (UTC) References: <0BczrmJbymhlC1HT8reRuMqtiAS4oHb0XONP-HIHbdrHzpjJTH_li3QNbaFQjpHZ_Teb3vePUKzV7gL9TGUSq5Fo_VcnCBobNsdJqRjSUGw=@protonmail.com> <87pmear4gx.fsf@riseup.net> From: Csepp To: Mohamed Amine LEGHERABA Cc: Csepp , "(" , help-guix@gnu.org Subject: Re: How to use/install rust nightly on guix ? Date: Mon, 31 Oct 2022 02:05:54 +0100 In-reply-to: Message-ID: <87o7tshk4q.fsf@riseup.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=198.252.153.6; envelope-from=raingloom@riseup.net; helo=mx0.riseup.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Help-Guix" Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1667178743; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=/R+7JYDsqEl79GWHlQRpZrgW4NekGTDn12zxp/7y6yM=; b=oo8NZQbb6VRvKCTr5AuHg9kddh/uvv+wbJNWE1uLJ0MNm7oNbmpUyFtJFqt04EyyqfYy+L lBuJmjVgf6JMCpXPUPFkyqBIJf1WhD23xz/bsuVTUBqdC77vJpM+kzk3mh4ChZty1U9LYa OMHM1G2uo9AfWUwLCkWC0p+Mex8RT0x6/ykUPxAkiOxtZm4PtLHDwChn3zo6KS9VIcPo7q M11ssBvVIPk9RpUBR7hbxSeEmsmABODfB2b69opEVKUDpdzmJbHEY7x4swrEbEKueNGZ5Y IP6zmHMRMjaNf96mgcWXB5mYC6grlxOBRihmns5h1HhFb9IrUVeRtblKFsTwbw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667178743; a=rsa-sha256; cv=none; b=bsrG1ulH8eQkrfX6QIoED9idWt22QTG81U2SfPdJ4Bvy/vIraJFHY8kZRmIw9PXPR74vnv xvxG1gV0jTyqJKC78h22aAIb5sY925r1xiZPr0rLNh4OLM6hp4txWjza0/AgyOfcf9keDx 25irnKTtz4HJ/Q3L1UepIp1S9AFm/mb1TFBC2IjLmaCpC4LS2UGWt34GC1oz5gA88Jn+bu NUfAvGxqYQbfQXh6GdAIzFRjJEODly/YHJoXr77ugrwZezAXRRJ/POzMSMGaZmKaNOhgux FINjgZM7rW+H+S7vbKOFFo0MZskoAEaISUtxxgitnaf84yiHUFtWYaW8Efgu2w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=riseup.net header.s=squak header.b=or6dfxli; dmarc=pass (policy=none) header.from=riseup.net; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -8.36 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=riseup.net header.s=squak header.b=or6dfxli; dmarc=pass (policy=none) header.from=riseup.net; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 051B615821 X-Spam-Score: -8.36 X-Migadu-Scanner: scn0.migadu.com X-TUID: wFpliOHkVVlw --=-=-= Content-Type: text/plain Mohamed Amine LEGHERABA writes: > Yes Csepp I'm interested by your tutoriel on how to create a chroot > Arch on Guix, It will allow me to run several "exotic" > languages/programs on my computer (including rust nigthly). > > Thanks, > Mohamed Amine LEGHERABA Here is the current version. --=-=-= Content-Type: text/plain Content-Disposition: inline; filename="arch chroot on guix.gmi" Content-Description: rubber duck debug log => https://bugs.archlinux.org/task/46169 Download bootstrap chroot => http://quantum-mirror.hu/mirrors/pub/archlinux/iso/2021.11.01/archlinux-bootstrap-2021.11.01-x86_64.tar.gz Extract it somewhere. Final boot script. Important!!! Run with `sudo -E`. The "-E" is important. Or just hardcode the path to your home directory. ``` #!/bin/sh set -ex cd "$(dirname "$0")" mount --bind root.x86_64 root.x86_64 mount -o bind "$HOME" root.x86_64/home/user/host-home # delete these two if you are not using Guix, or modify them if you are using Nix mount -o bind,ro /gnu/store root.x86_64/gnu/store mount -o bind,ro /var/guix root.x86_64/var/guix bash root.x86_64/bin/arch-chroot root.x86_64 /bin/env -i bash -l # again, delete them umount -l root.x86_64/var/guix umount -l root.x86_64/gnu/store umount -l root.x86_64/home/user/host-home umount -l root.x86_64 ``` First time, on the host system: ``` # write down this number, it will be important echo $UID sudo mount --bind root.x86_64 root.x86_64 sudo bash root.x86_64/bin/arch-chroot root.x86_64 /bin/env -i bash -l ``` First time setup inside guest: ``` # enable some mirrors sed -i 's/^#\(.*\.hu.*\)/\1/' /etc/pacman.d/mirrorlist # set up timezone ln -s /usr/share/zoneinfo/Europe/Budapest /etc/localtime # initalize package manager pacman-key --init pacman-key --populate archlinux # install development packages pacman -Syu --needed git base-devel # optional if you are using Guix, otherwise not really: pacman -S base # (if you are using Guix or Nix, you can just mount their store and use their packages) # create store mount point mkdir -p /gnu/store mkdir -p /var/guix # create a non-root user. the UID thing is important, it lets you share your host's home directory in the guest. useradd -m -u $UID_OF_HOST_USER user # optional: ignore all security precautions and enable passwordless sudo for this user? # maybe don't do this? echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers # alternatively, add a password usermod -aG wheel user passwd user echo "%wheel ALL=(ALL:ALL) ALL" >> /etc/sudoers # change to a login shell of the new user su -l user # create host home mount mkdir ~/host-home # install yay git clone https://aur.archlinux.org/yay.git cd yay makepkg -si # now you can install anything, like, say, Infer. yay -Sy infer # link to host guix. ignore if your host system isn't Guix. (cd ~/.config; ln -s ../host-home/.config/guix ~/.config/guix) ln -s host-home/.guix-profile ~/.guix-profile/ ``` --=-=-= Content-Type: text/plain I wrote it in a way that is hopefully usable to others, but it's still not exactly a polished how-to guide, so if you have any questions, feel free to ask them. There are a bunch of gotchas that I probably forgot to mention, like how having Guix's environment variables active can mess with Arch's upgrades. --=-=-=--