Hi Efraim,

I had not realized that all the cool kids were doing Btrfs! 😎


On Thu Mar 13, 2025 at 7:33 AM CET, Efraim Flashner wrote:
> The literal pipes hurt my brain, so as someone who (still) hasn't dived
> deeply into Guile I have a different option I've come up with for mixing
> Guile and external programs:
>
> ```
> (define (decrypt-password encrypted-string)
>   (program-file
>     "magic-password-file"
>     #~(begin
>         (use-modules (ice-9 popen)
>                      (ice-9 rdelim))
>         (display
>           (read-line (pipeline
>                        '((#$(file-append (S "coreutils-minimal") "/bin/echo")
>                           #$encrypted-string)
>                          (#$(file-append (S "coreutils-minimal") 
> "/bin/base64")
>                           "--decode")
>                          (#$(file-append (S "gnupg") "/bin/gpg")
>                           "--no-tty"
>                           "--for-your-eyes-only"
>                           "--quiet"
>                           "--decrypt"))))))))
>
> (define %dbxfs-token
>   (decrypt-password %dbxfs-token-base64))
> ```

Thanks to you and to everyone who contributed snippets!
For sure, I’ll have to go through this thread again and to set up everything
properly!

-- 
Tanguy

Reply via email to