From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id cLRCAlNSAGUyCgAAauVa8A:P1 (envelope-from ) for ; Tue, 12 Sep 2023 13:58:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id cLRCAlNSAGUyCgAAauVa8A (envelope-from ) for ; Tue, 12 Sep 2023 13:58:11 +0200 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 9CDFA43D94 for ; Tue, 12 Sep 2023 13:58:10 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=trop.in header.s=gm1 header.b=UB+hzaOR; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1694519890; a=rsa-sha256; cv=none; b=KRYTkSp0A0zwRbljmheCWXL6qh2Q3izwonYIcKp8tgRxEm5hn8Lj/P+CyfOknHlaNre1sC N/DQnqXmJ/6fmUAmJXt5rHotOS7hOgQkX2jTuIVOJjJ+I7saHnKMWjqMZGPoHIxK7fZraO gRKaRmcZwYDbbDEd3hJi+QgJSa1RgFIPo652ofO0hpKb/W66Eaz6plM/rNEJdsCuSwAISx +DK8lzWLk/hSwWdEPN5OQ9f6x2pawkT7brtnKcVMy7BRn7wDIUkdZsM9q34We3d1dUBDBX UBHPj6CJ8nZ29un3FgXRm1hXb5Nd0BDRBCgufhMzXQB21poRZDtVA8Mh4N3N0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1694519890; 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=058yRdqCspzjN3s6GrPNEA4Eilu8etFnVAcaMQqPGmw=; b=oMsKX1vyWpRhMvhdEEk3eyhvRgta7bLnsKhu4QTiiis4RXc2lOIyUab1FlXoFzY7myUx4U Jb6X4X3nfvCXUAm1DpjK1LAkj8oBaSlaY5ohHimL0X4NM9Pnt4N1uXtcWnsOnqymyhzNco rAPBSlWhLBCselJQLRiri9dVDQq7KQ/jo3Y0iRoikv1H76E/DbxrCucmoV2FOZM0EK2VCq JoGs7aLl+3ihuE2N7DYkqE+JRyhG6NFmdRDuOjSlYKX68onQUDtbZAhF9w0+yb6S9anyjq bECMM6Qrw1XlZW+IwB46TVDdQWdRdiUABXTQWfvOIEwTlkeXmsJxRR4so3i50w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=trop.in header.s=gm1 header.b=UB+hzaOR; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=none Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qg1kk-0003Vs-K4; Tue, 12 Sep 2023 07:40:22 -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 1qg1kf-0003SG-Lj for guix-devel@gnu.org; Tue, 12 Sep 2023 07:40:17 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qg1kZ-0002t0-La for guix-devel@gnu.org; Tue, 12 Sep 2023 07:40:17 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id C6E3F1C000B; Tue, 12 Sep 2023 11:40:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1694518803; h=from:from: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; bh=058yRdqCspzjN3s6GrPNEA4Eilu8etFnVAcaMQqPGmw=; b=UB+hzaORVBTDl0NYa27+m7Px7l7cRezHV6ey/XS9JqlKjjINm9xnDzXwPyLOlUeizsIwOw peehZThxAFa3HC5NJ2rGM+lHRGHZjVHCTMpL2NYg1uFLxGBIX5O57SPUMrSKGqFPPAZNLs OZuHJwAI3pTlwcuuQuEjC9h963dC+Wg0yvNpRbcXbhdfTvYBVpNfZ0vb7jFbQyoo8U7nC6 flo6U5NKlSySsgj7ioq6DT6NDIGYcTyrVIFuFiRedSE3oH9kvV6S+rz3i+UH124FBmucDo ijAatORgZFfzmQK+sHKpDC2qgAxxdEySmW5+2utWkSMnMJOZxlvMMv1xtRTn9A== From: Andrew Tropin To: Nicolas Graves , guix-devel@gnu.org Cc: efraim@flashner.co.il, maxim.cournoyer@gmail.com, Felix Lechner , Ryan Sundberg Subject: Re: btrfs recommended layout for snapshots? In-Reply-To: <87y1i95ii7.fsf@ngraves.fr> References: <87jztxn2hc.fsf@ngraves.fr> <87h6p1n0sv.fsf@ngraves.fr> <87o7j776ha.fsf@ngraves.fr> <87y1i95ii7.fsf@ngraves.fr> Date: Tue, 12 Sep 2023 15:39:57 +0400 Message-ID: <874jjzzkky.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-GND-Sasl: andrew@trop.in Received-SPF: pass client-ip=217.70.183.197; envelope-from=andrew@trop.in; helo=relay5-d.mail.gandi.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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -8.53 X-Spam-Score: -8.53 X-Migadu-Queue-Id: 9CDFA43D94 X-Migadu-Scanner: mx2.migadu.com X-TUID: 6qWLPtgbwD7q --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2023-08-18 01:58, Nicolas Graves wrote: > On 2023-08-16 10:10, Nicolas Graves wrote: > >> I guess it's possible to do the same with my home as well (thus only >> saving actual data and not consecutive linking metadata), but that might >> require some more time and fine-grained applications considerations. >> >> One weakness from this impermanence feature is that it's actually >> application-dependent. For guix-system it's not very damaging (except if >> we want very low-level optimizations, like setting nodatacow on >> subvolumes with databases etc), but for guix-home, it makes things much >> more difficult. @Andrew Tropin : maybe that's something we could in RDE = in >> a state-btrfs in (gnu home-services state) if we find a way to migrate >> directories to subvolumes safely and reproducibly. > > Some notes about more progress I've done. > > My attempt to also load the /home subvolume on tmfps has quite > progressed. I've created the following subvolumes : > > ;; App related (apps who doesn't entirely follow the XDG base directory > ;; specification and save data or cache outside of XDG_DATA_HOME, > ;; XDG_STATE_HOME and XDG_CACHE_HOME. Other users may need other app dirs. > > /home/graves/.config/chromium > /home/graves/.config/emacs > /home/graves/.config/libreoffice > /home/graves/.config/guix > /home/graves/.ssh > > ;; XDG_CACHE_HOME, XDG_STATE_HOME, XDG_DATA_HOME (I'm using RDE) > > /home/graves/.cache > /home/graves/.local > > ;; And some personal want-to-save directories. > > /home/graves/archives > /home/graves/resources > /home/graves/projects > /home/graves/spheres > > The only thing that seems to get in my way to achieve this properly > is... .guix-home! Which I don't want to backup since it's only a link > and that would require at least /home/graves/ to be snapshotted. > > I thus have a proposition for discussion : > Make .guix-home XDG base dir compliant by storing a symlink > in $XDG_CONFIG_DIR/guix/home to /var/guix/per-user/$user/guix-home > instead of the current default of the symlink > in /home/$user/.guix-home to the actual object in the store. > > This was discussed in a previous mail thread : > "RFC: Configurable placing of the ~/.guix-home symlink" > With Andrew concluding that > >> Back in the day, the implementation of Guix Home required a symlink in >> home directory, right now due to improvements in symlink-manager and >> reconfigure code it's probably not necessary and with a few patches >> /var/guix/profiles/per-user/bob/guix-home/ can be used instead. > > With a first glance, I think it's possible to do in the code, since the > home-run-on-first-login-service-type already gets the UID of the user, > and with the following guile function : > > Scheme Procedure: passwd:name pw > The name of the userid. > > we should be able to get the name of the user and replace > ~/.guix-home with /var/guix/per-user/$user/guix-home everywhere. > So the code where a hardlink is needed will be, and the "pleasing UX of > searching within guix home" would also be possible. > > I also don't really see the reason why .guix-home shouldn't be > $XDG_CONFIG_DIR/guix/home since it's really user-specific and unique > (and XDG user dirs are too), unlike .guix-profile. I don't have all the context loaded in my head right now, but it's probably possible now, and we can try to implement it. Feel free to send a patch and Cc me or continue the discussion on "RFC: Configurable placing of the ~/.guix-home symlink". > > This may be the one of the only missing step to make the (manual and > only with directories (btrfs subvolumes), at least for now) > implementation of impermanence (a quick reminder of the idea implemented > by nix here : https://nixos.wiki/wiki/Impermanence) on with guix home, I > would appreciate some feedback comments on the idea ;) (another step > would be to actually activate the home environment on login in > home-shell-profile-service-type, but migrating .guix-home would be a > requirement). =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmUATg0ACgkQIgjSCVjB 3rBPsg//YcgciGGMAiuHn9Upeetm6SS5FbC1BmrxyHv3yGAreyGO2WZzUSR28X0G t+m6vHh/dM7RlumYc7/iwMYf7M/nMEpNddlOI7BxlUfEGKXgeUkRuI52qx9d6gxo 2lfqQlkdO0wC3ndZMmrCbLbjYJDK6vPxeWw8K7beA+cm/ruaMW/yr652NgzNolG+ /v89/H7r+fps7XsXqI067Di4D+ztBBNnxK9xhWDvgjkQlwYo9ccyfALeYTEAEs8R NeATiLOH/0jfIACsF7z6GU8sDa5ztXTtMM5FiZFKpgNIQZc1T7FJ2C4uFwEQjiiP aD2iFY5COPUTUac+qjjnB0Opgi959YE0Jt3akhshR0bzg9jEOMvfZyoOYgA3wAiV 2IBkTZ5wyYpOuECyoNJPfLRhkmC4fyzr7664GxJONLOaRcMnDGqH21Hz8uno/u9l 5PKKU2fCb3wbVPAE8oYZln/c88HrDC9cJiTTjn3ASImMTOoO5QCIpeVK4WBAx3VS GBpbvNu9p2FftfiQPVD78U6tzkV4kERm3SeQK62QHZ0mraaUvhHVkpkq0MOz6Dq9 m3mi3XVGn8ROQMGQ7gTbJMJmN1vviXgyot0dv8e0Siqx5Dym+gI4MhHY6Vyv6SpP /wIHVJODcui29Ub6tzkO8b1XQo8XX39U8NhNi+zKERTs3ex7h2o= =OeIT -----END PGP SIGNATURE----- --=-=-=--