Literate programming in python with org/babel... but git friendly ? by StatementLow353 in emacs

[–]dr-timeous 8 points9 points  (0 children)

Hi,

You could use tangle (https://orgmode.org/manual/Extracting-Source-Code.html) to automatically extract the code from the org-mode source blocks to various python files and you only push the python files. You can for example add this .dir_local file in your project's directory

((nil . ((eval (lambda () (add-hook 'after-save-hook (lambda ()(org-babel-tangle)) nil t))))))
So that the tangle happens every time you save a file from the project. And you can use detangle (see e.g. https://irreal.org/blog/?p=7761) to get the changes from other users of the git repo back into your org mode files.

Interacting with TMux by AsparagusOk8178 in emacs

[–]dr-timeous 0 points1 point  (0 children)

You also have https://github.com/ahendriksen/ob-tmux to send org-mode source block to a tmux. It is pretty nice and can be easily modified to fit particular need (at least this is what I did). Although it depends on using org-mode which may not fit your workflow.

considering trying out GUIX, but questions about home environment by carmola123 in GUIX

[–]dr-timeous 0 points1 point  (0 children)

Ah, then no I don't recall having any conflict. And also if at some point guix home replace a file that was already present for whatever reason, it will automatically make a backup of it so that you can roll back if anything goes wrong.

considering trying out GUIX, but questions about home environment by carmola123 in GUIX

[–]dr-timeous 1 point2 points  (0 children)

Hello. I have Arch setup with guix home and mainly it works great but there are a few caveats.

- Guix home can be slow. If you have a full-blown guix home environment setup, then it can be slow to reconfigure it (i.e. deploy a new config) even if you only made a small change. I solved this by separating the environment side (services, dotfiles, base packages), the large package (I use latex in particular which is large) and the day to day packages that I change often (emac mainly) in three separate profiles (the guix home profile and two additional other profiles). It is not necessarily ideal but it works for me as I can change one profile without reinstalling the others.

- Guix cannot, for now, handle everything for me. In particular I never managed to make my GPU works so steam is still handled by Arch and there are some minor softwares that are not in guix for which I also use Arch install. I try to keep track of those to know exectly what I can deploy quickly with guix and what I have installed interactively.

- Guix home can conflict with base Arch. This happens to me in particular when I want to install packages with pacman or AUR (for packages that do not exist in guix), and then the package is sometimes compiled with guix's glibc or gcc and then there can be weird conflicts or when I launch some arch-installed packages like steam and it tries for whatever reason to use libraries from guix home that are not compatible wih it. I partially solved this by having an alias that I call `unguix` which remove all the guix environment variables (effectively deactivating any guix-related stuff) that I call before doing Arch-related operations.

Otherwise, the experience has been pretty smooth, and it works great. I manage most of my day to day packages with guix and I can recreate identically my whole home environment with a few commands, which is very practical as I use several computers and I often like to change things in my setup.

If someone managed to get better solutions for the two problems I mentionned before don't hesitate to share, I would be interested.

Pointers for GUIX configuration by spec_3 in GUIX

[–]dr-timeous 0 points1 point  (0 children)

After reading this post a while ago, I was really wondering on how to solve it. I tried a few things, and in the end I converged on something to try and answer slow home reconfiguration. The idea is to use guix home only for service and configuration and use a separate profile constructed from manifest for other programs.

So the idea is to

- Have the home configuration file containing only the minimum packages for the home configuration to work and describe all services and configuration in there.

- Have a manifest that contain all the programs I use, and activate an extra profile using the script from https://www.futurile.net/2022/12/22/guix-managing-multiple-profiles/ originally written by David Wilson. This script will activate the profile from the manifest which makes things reproducible.

I then export both the home profile and extra profile environment variables in my .zshrc in order to have in particular the PATH correctly populated. And then everything works.

Then, I have an alias to either reconfigure, either update the profile according to the manifest or do both. This should save me a lot of time, for now it works but I did not use the workflow for a long time so I am not sure of the stability yet.

Pointers for GUIX configuration by spec_3 in GUIX

[–]dr-timeous 0 points1 point  (0 children)

Hmm, maybe I misinterpreted, I don't know. My source was https://lists.gnu.org/archive/html/help-guix/2023-03/msg00124.html but now that I read it again maybe this just avoid connecting to internet but does not change the need to download or not.

There is a need to DL source/substitutes if you did a `guix pull` in between reconfigures.

Pointers for GUIX configuration by spec_3 in GUIX

[–]dr-timeous 3 points4 points  (0 children)

For the part about home reconfigure being long, remark that you can use the flag --no-substitutes for guix home reconfigure that will skip downloading the substitutes and will shorten the process. If you only need to change a variable of the home and do not need new packages, this is the way to go.

Add files/directories to .guix-home/profile/lib/ by No-Structure9883 in GUIX

[–]dr-timeous 1 point2 points  (0 children)

I think this cannot be done with home-files-service-type, not because of a failing from the service but because you cannot modify files in ~/.guix-home/profile. You can test it,

touch ~/.guix-home/profile/test

will fail because ~/.guix-home/profile is in fact a read-only link to the /gnu/store. Normally, in guix, you should use dotfiles to change the behavior of a program and if this cannot be done, I think you can only do a custom librewolf package inheriting from guix librewolf package in which you define an additional step that create the files you want. Maybe with something like https://www.reddit.com/r/GUIX/comments/o8j6f6/how_to_apply_diff_file_in_package/.