Hi Ludo’, Sorry, busy week! 😅 … euh… busy 2 weeks! 😱
Quoting Ludovic Courtès (2023-05-03 22:42:27) > Tanguy LE CARROUR <tan...@bioneland.org> skribis: > > > Quoting Ludovic Courtès (2023-04-17 15:39:02) > >> Tanguy LE CARROUR <tan...@bioneland.org> skribis: > >> > It's been quite a journey on my side! Ups. Downs. Mostly downs, though! 😅 > >> > Thanks to Simon's unconditional technical and moral support, a **LOT** > >> > has changed since I sent this message. Hopefully for the better! 🤞 > >> > >> Heh. :-) While it’s fresh on your mind, it would be nice to list the > >> problems you ran into on your journey and see what we can do about it. > > > > Mostly figuring out how to test it! > > > > On my machine at home, `guix home reconfigure` can take minutes. > > Did you test with ‘guix home container’ first? That’s what I do and I > added this command precisely so one can test without any risk of > breaking things. > > It’s still too slow though, that’s right. Yes, when I use my actual home config, it also takes minutes to build the container, but, if I use a fake home config, limited to the service I want to test, it's way faster! Still slower than the following… Append this test code at the end of the service file: ```scheme (define configuration (home-service-configuration ; […] ) (mixed-text-file "test" (serialize-configuration configuration home-service-configuration-fields)) ``` Then, from the command line: ```console $ cat (guix build -f path/to/home/service.scm) # … the content of the generated file ``` > > I can only test file generation, though. > > The msmtp service does nothing but file generation though, right? > > > Then I painfully discovered that replacing in a string is not as easy as > > it sounds, or, more precisely, that "python replace in string" yields > > better results than "scheme replace in string" in DuckDuckGo! > > True! Perhaps something to add to the Cookbook’s Scheme intro. > > (Fun fact: I’ve never used that (ice-9 string-fun) module that keeps > popping up in new code. :-)) Whaaaat?! 🤯 How one would you do without it? 😅 -- Tanguy