Hi Tanguy,
I'm way not knowledgeable yet to give you a proper answer, but I'd like
to know too! So a comment by someone with more background knowledge
would be appreciated. Here are my findings w.r.t. a similar problem.
I think your situation with offloading is similar to my situation with
extra-special-files. extra-special-files are also not removed when
their declaration is commented out, and they should be removed manually.
It took me quite long to figure out what was going on.
It is my conclusion that the current design precludes a mechanism to
remove those files properly in an automated fashion. Because you might
reboot and choose an older generation, and that older generation has no
way to determine why that symlink is there; e.g. maybe you put it there
by hand. But maybe I'm wrong? Someone please correct me.
What I see as a way forward is to let mechanisms like this never create
a direct link to the store, but always through a profile, and have the
file in the profile link to the store. That way, a reconfigure can see
that the existing link is to another (by definition unwanted) system
profile, and can safely remove it. I can't judge whether that would be
a good way forward though.
It is on my (wish)list of
things-to-maybe-tackle-once-I-know-what-I'm-doing, because I find the
current behavior confusing (and wrong?). A more general solution would
be good. E.g. my `/etc/` is also full of files and symlinks that
earlier reconfigures put there and that were never removed.
My 2cts,
Hugo
On 18/3/26 12:09, Tanguy Le Carrour wrote:
Hi Guix,
Last month I set up offloading on my Guix System to be able to offload
build to a more powerful computer. Now this computer is offline so
I wanted to turn off offloading… but failed to do so?! I know have to add
`--no-offload` to most of my Guix commands! 😱
My service configuration looks like this:
```scheme
(services
(append
(modify-services
%desktop-services
(guix-service-type
config => (guix-configuration
(inherit config)
(authorized-keys
(append
(list
(local-file "files/rafflesia.pub"))
%default-authorized-guix-keys))
(build-machines
(list
; #~(build-machine
; (name "rafflesia")
; (systems (list "x86_64-linux" "armhf-linux"))
; (host-key "ssh-ed25519
AAAAC3NzaC1lZDI1NTE5AAAAIL/S4mANVaqk4s6Qd7K0R2fFqzrVtqrdrRLb/uOqRB5V")
; (user "bob")
; (private-key
"/home/tanguy/tmp/bob@rafflesia_ed25519")
; (parallel-builds 8))
)))))
; …
```
When uncommented, it produced the following file:
`/etc/guix/machines.scm ->
/gnu/store/yszkwdhpkganzkdgjy8iw9xmx5p7gdyz-machines.scm`
That contains:
```scheme
(eval-when (expand load eval) (let ((extensions (quote ())) (prepend (lambda (items lst) (let loop ((items items) (lst lst)) (if (null? items) lst (loop (cdr items) (cons (car items)
(delete (car items) lst)))))))) (set! %load-path (prepend (cons "/gnu/store/c6cf35bavqqs5mqsffl45izqaf0qn4dg-module-import" (map (lambda (extension) (string-append extension
"/share/guile/site/" (effective-version))) extensions)) %load-path)) (set! %load-compiled-path (prepend (cons
"/gnu/store/ciyca72rh63y2mpszwn4csrlxx2l62pk-module-import-compiled" (map (lambda (extension) (string-append extension "/lib/guile/" (effective-version)
"/site-ccache")) extensions)) %load-compiled-path))))((@ (srfi srfi-1) append-map) (lambda (entry) (if (build-machine? entry) (list entry) entry)) (list (build-machine (name
"rafflesia") (systems (list "x86_64-linux" "armhf-linux")) (host-key "ssh-ed25519
AAAAC3NzaC1lZDI1NTE5AAAAIL/S4mANVaqk4s6Qd7K0R2fFqzrVtqrdrRLb/uOqRB5V") (user "bob") (private-key "/home/tanguy/tmp/bob@rafflesia_ed25519") (parallel-builds 8))))
```
When I comment it out, reconfigure… I still have the exact same link to the
same store item?!
Is that the expected behaviour? Should I do something else to un-configure the
offload?
Best regards,
--
Tanguy