12 Dec 2024 |
| @acidbong:envs.net joined the room. | 09:45:17 |
@acidbong:envs.net | trying to add an option to propagate extra programs to emacsWithPackagesFromUsePackage , but adding propagatedUserEnvPkgs to default.el doesn't seem to work. what could be a better way? https://github.com/nix-community/emacs-overlay/pull/452 (reply under the PR, not here) | 10:07:33 |
antifuchs | I think the commonly done thing is to generate a .el file with substituteAll that sets exec-path to include the paths you need added | 21:45:07 |
antifuchs | * I think the commonly done thing is to generate a .el file with substituteAll that sets exec-path to include the paths you need added and then load that in your init | 21:45:31 |
13 Dec 2024 |
@acidbong:envs.net | @antifuchs:asf.computer modifying exec-path is cool, but there's a few issues:
- can't run programs indirectly: with Rust-analyzer and Clippy in exec-path, Eglot can run
rust-analyser , but Rust-analyzer can't run cargo clippy , since the latter isn't in PATH
- (not directly Emacs' fault) direnv.el and envrc.el, when they set exec-path, they first synchronize it with PATH, thus removing extra entries not present in PATH
| 13:01:11 |
antifuchs | Oh, hah! I have a second bit in my emacs config that setenv’s PATH to the value of exec-path | 13:01:49 |
antifuchs | That might be the bit you need also; both of these things have worked for me without an issue ever since adding that | 13:02:20 |
antifuchs | here's what I do (and note that I put /usr/local/bin and other paths on there only for extremely legacy reasons & can probably just delete that):
(let ((new-exec-path (nconc
(list
"@emacsExecPath@"
"/run/current-system/sw/bin"
"/usr/local/bin"
(concat (getenv "HOME") "/.nix-profile/bin")
(concat (getenv "HOME") "/go/bin")
(concat (getenv "HOME") "/.cargo/bin"))
exec-path)))
(setq exec-path new-exec-path)
(setenv "PATH" (mapconcat 'identity exec-path ":")))
| 13:07:20 |
antifuchs | also, I find it useful to put that into early-init.el, so that it happens very very early in the emacs startup process | 13:07:49 |
linj | In reply to @antifuchs:asf.computer I think the commonly done thing is to generate a .el file with substituteAll that sets exec-path to include the paths you need added and then load that in your init withPackages wrapper will add bin to exec-path for you | 13:10:27 |
antifuchs | huh, that's awesome to know! | 13:10:41 |
antifuchs | well, then yeah, just syncing exec-path over to $PATH might be what you need | 13:11:00 |
@acidbong:envs.net | ight, TIL a bunch | 16:49:58 |
@acidbong:envs.net | thx | 16:49:59 |
@acidbong:envs.net | does nix-community's cachix still provides emacs packages? | 17:53:40 |
@acidbong:envs.net | (also, only for Motif Emacs or GTK/PGTK as well?) | 17:54:27 |
@acidbong:envs.net | * does nix-community's cachix still provide emacs packages? | 17:54:35 |
Узумаки | I dunno when I've seen a package pulled from cache | 17:58:43 |
Узумаки | I'm always compiling it seemingly | 17:59:01 |
Узумаки | In reply to @imperivohaace:matrix.org I'm always compiling it seemingly All of the emacs package I mean | 17:59:15 |
Узумаки | But emacs pgtk itself is a cache hit | 17:59:44 |
linj | there is no cache for emacs pgtk's elisp package set | 18:24:25 |
14 Dec 2024 |
zororg | related issue: https://github.com/NixOS/nixpkgs/issues/324912 | 06:44:09 |
15 Dec 2024 |
| noh myla joined the room. | 12:04:02 |
| Moritz Sanft joined the room. | 16:27:27 |
16 Dec 2024 |
| starlit joined the room. | 10:13:23 |
starlit | since an update, pinentryFlavor = "gtk2"; is no more. So I do as suggested
programs = {
gnupg = {
agent = {
enable = true;
enableSSHSupport = true;
# TODO: https://discourse.nixos.org/t/cant-get-gnupg-to-work-no-pinentry/15373/33
# programs.gnupg.agent.pinentryFlavor' no longer,
# programs.gnupg.agent.pinentryPackage instead
# pinentryFlavor = "gtk2";
pinentryPackage = pkgs.pinentry-gtk2;
};
dirmngr.enable = true;
};
};
but doesn't work on Emacs anyway. Any insights please?
| 10:15:05 |
starlit | * since an update, pinentryFlavor = "gtk2"; is no more. So I do as suggested pinentryPackage = pkgs.pinentry-gtk2;
programs = {
gnupg = {
agent = {
enable = true;
enableSSHSupport = true;
# TODO: https://discourse.nixos.org/t/cant-get-gnupg-to-work-no-pinentry/15373/33
# programs.gnupg.agent.pinentryFlavor' no longer,
# programs.gnupg.agent.pinentryPackage instead
# pinentryFlavor = "gtk2";
pinentryPackage = pkgs.pinentry-gtk2;
};
dirmngr.enable = true;
};
};
but doesn't work on Emacs anyway. Any insights please?
| 10:15:31 |
starlit | For example, magit error
128 git … commit --
hint: Waiting for your editor to close the file...
WITH-EDITOR: 5648 OPEN /etc/nixos/.git/COMMIT_EDITMSG IN /etc/nixos
error: gpg failed to sign the data:
gpg: WARNING: unsafe ownership on homedir '/root/.gnupg'
[GNUPG:] KEY_CONSIDERED HASHHERE 2
[GNUPG:] BEGIN_SIGNING H8
[GNUPG:] PINENTRY_LAUNCHED 6008 gtk2:curses 1.3.1-unknown - dumb :0 - 0/0 0
gpg: signing failed: Inappropriate ioctl for device
[GNUPG:] FAILURE sign 83918950
gpg: signing failed: Inappropriate ioctl for device
fatal: failed to write commit object
0 git … add -- profile/dev/guix.nix
0 git … add -u -- profile/app/guix.nix
0 git … add -u -- host/common/global/default.nix
0 git … reset HEAD -- host/common/global/default.nix
Unstaged changes after reset:
M flake.nix
M host/common/global/default.nix
M packages/default.nix
M profile/dev/python.nix
M profile/sys/prime.nix
0 git … reset HEAD -- profile/app/guix.nix profile/dev/guix.nix
Unstaged changes after reset:
M flake.nix
M host/common/global/default.nix
M packages/default.nix
D profile/app/guix.nix
M profile/dev/python.nix
M profile/sys/prime.nix
0 git … add -u -- profile/dev/python.nix
0 git … commit --no-gpg-sign --no-edit --fixup\=899df3d --
[local f0503fc] fixup! add: python313, python-ls-server.all
1 file changed, 2 insertions(+)
1 git … rebase -i --autosquash --autostash --keep-empty 899df3d\^
Created autostash: 2fd7638
hint: Waiting for your editor to close the file...
error: gpg failed to sign the data:
gpg: WARNING: unsafe ownership on homedir '/root/.gnupg'
[GNUPG:] KEY_CONSIDERED HASHHERE 2
[GNUPG:] BEGIN_SIGNING H8
[GNUPG:] PINENTRY_LAUNCHED 13568 gtk2:curses 1.3.1-unknown - dumb :0 - 0/0 0
gpg: signing failed: Inappropriate ioctl for device
[GNUPG:] FAILURE sign 83918950
gpg: signing failed: Inappropriate ioctl for device
error: failed to write commit object
hint: Could not execute the todo command
hint:
hint: fixup f0503fcffebd27d76713e67a033eea09dcf18d66 fixup! add: python313, python-ls-server.all
hint:
hint: It has been rescheduled; To edit the command before continuing, please
hint: edit the todo list first:
hint:
hint: git rebase --edit-todo
hint: git rebase --continue
run git … commit --
hint: Waiting for your editor to close the file...
WITH-EDITOR: 13931 OPEN /etc/nixos/.git/COMMIT_EDITMSG IN /etc/nixos
| 10:17:52 |
starlit | * since an update, pinentryFlavor = "gtk2"; is no more. So I do as suggested pinentryPackage = pkgs.pinentry-gtk2;
programs = {
gnupg = {
agent = {
enable = true;
enableSSHSupport = true;
# TODO: https://discourse.nixos.org/t/cant-get-gnupg-to-work-no-pinentry/15373/33
# programs.gnupg.agent.pinentryFlavor' no longer,
# programs.gnupg.agent.pinentryPackage instead
# pinentryFlavor = "gtk2";
pinentryPackage = pkgs.pinentry-gtk2;
};
dirmngr.enable = true;
};
};
but doesn't work on Emacs magit anyway. Any insights please?
| 10:18:10 |