bug#71352: branch master updated: services: nix: Mount Nix store read only.
Hello, guix-comm...@gnu.org writes: > services: nix: Mount Nix store read only. > > * gnu/services/nix.scm (nix-shepherd-service): Add requirements. > (%nix-store-directory): New variable. > (nix-service-type): Add file-system-service-type extension. > > Change-Id: I18a5d58c92c1f2b5b6dcecc3d5b439cc15bf4e49 This commit unfortunately appears to introduce a regression where reconfiguring a system with the read-only /nix/store causes the following error: --8<---cut here---start->8--- guix system: error: chown: Système de fichiers accessible en lecture seulement --8<---cut here---end--->8--- With the accompanying strace output: --8<---cut here---start->8--- 20261 close(17) = 0 20261 chown("/nix/store", 0, 981) = -1 EROFS (Système de fichiers accessible en lecture seulement) 20261 close(13) = 0 20261 write(2, "guix system: \33[1;31merror: \33[0m\33[1mchown\33[0m: Syst\303\250me de fichiers accessible en lecture seulement\n", 99) = 99 --8<---cut here---end--->8--- Are these chown still useful in the activation snippet? --8<---cut here---start->8--- (define (nix-activation _) ;; Return the activation gexp. #~(begin (use-modules (guix build utils) (srfi srfi-26)) (for-each (cut mkdir-p <>) '("/nix/store" "/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) (for-each (cut chmod <> #o777) '("/nix/var/nix/profiles" "/nix/var/nix/profiles/per-user" --8<---cut here---end--->8--- If they are useful only on the first time, perhaps we could catch the exceptions for when it runs on an already read-only mounted /nix/store? -- Thanks, Maxim
bug#71332: guix gc delete order
On 2024-06-03 15:26, Nicolas Graves via Bug reports for GNU Guix wrote: > On 2024-06-03 09:30, Guillaume Le Vaillant wrote: > >> Hi. >> Is the guix-daemon of your system started with the >> "--gc-keep-derivations=yes" and "--gc-keep-outputs=yes" options? >> It should prevent "guix gc" from deleting the build dependencies of live >> profiles. Didn't know about those options, thank you for sharing! > > Probably not if they have to be added through the extra-options field of > record. I'll try that, thanks! I was suffering from the issue you have. After I updated SSD I just don't do gc, but it would be a good fix for the problem, if it works. -- Best regards, Andrew Tropin signature.asc Description: PGP signature
bug#71332: guix gc delete order
On 2024-06-03 09:30, Guillaume Le Vaillant wrote: > Hi. > Is the guix-daemon of your system started with the > "--gc-keep-derivations=yes" and "--gc-keep-outputs=yes" options? > It should prevent "guix gc" from deleting the build dependencies of live > profiles. Probably not if they have to be added through the extra-options field of record. I'll try that, thanks! -- Best regards, Nicolas Graves
bug#71332: guix gc delete order
Nicolas Graves via Bug reports for GNU Guix skribis: > Hi Guix, > > I feel the way `guix gc` choose its files to delete quite > inconvenient. For instance, when developping big programs locally, I > often find myself missing space, but when I will `guix gc -C30G`, > instead of the expected unused items (not present in any profile, just > built but discarded as the package I'm building is updated for > instance), I will instead loose most of the native-inputs that are > needed to build my `guix home` and `guix system`. > > This make me stuck in an endless loop of removing / redownloading over > and over the same native-inputs, while my intention is first to remove > files that aren't these native-inputs. > > I haven't delved into `guix gc` yet, how hard is that issue to solve? Hi. Is the guix-daemon of your system started with the "--gc-keep-derivations=yes" and "--gc-keep-outputs=yes" options? It should prevent "guix gc" from deleting the build dependencies of live profiles. signature.asc Description: PGP signature
bug#71332: guix gc delete order
Hi Guix, I feel the way `guix gc` choose its files to delete quite inconvenient. For instance, when developping big programs locally, I often find myself missing space, but when I will `guix gc -C30G`, instead of the expected unused items (not present in any profile, just built but discarded as the package I'm building is updated for instance), I will instead loose most of the native-inputs that are needed to build my `guix home` and `guix system`. This make me stuck in an endless loop of removing / redownloading over and over the same native-inputs, while my intention is first to remove files that aren't these native-inputs. I haven't delved into `guix gc` yet, how hard is that issue to solve? -- Best regards, Nicolas Graves