!ZmUSesoOjmVsKbzFbp:nixos.org

Nix Emacs

784 Members
All things Nix/Emacs! https://github.com/nix-community/emacs-overlay | For Doom Emacs: https://matrix.to/#/#doom-emacs:nixos.org176 Servers

Load older messages


SenderMessageTime
12 Dec 2024
@acidbong:envs.net@acidbong:envs.net joined the room.09:45:17
@acidbong:envs.net@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:asf.computerantifuchsI think the commonly done thing is to generate a .el file with substituteAll that sets exec-path to include the paths you need added21:45:07
@antifuchs:asf.computerantifuchs* 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 init21:45:31
13 Dec 2024
@acidbong:envs.net@acidbong:envs.net

@antifuchs:asf.computer modifying exec-path is cool, but there's a few issues:

  1. 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
  2. (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:asf.computerantifuchsOh, hah! I have a second bit in my emacs config that setenv’s PATH to the value of exec-path13:01:49
@antifuchs:asf.computerantifuchsThat might be the bit you need also; both of these things have worked for me without an issue ever since adding that13:02:20
@antifuchs:asf.computerantifuchs

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:asf.computerantifuchsalso, I find it useful to put that into early-init.el, so that it happens very very early in the emacs startup process13:07:49
@me:linj.techlinj
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:asf.computerantifuchshuh, that's awesome to know!13:10:41
@antifuchs:asf.computerantifuchswell, then yeah, just syncing exec-path over to $PATH might be what you need13:11:00
@acidbong:envs.net@acidbong:envs.netight, TIL a bunch16:49:58
@acidbong:envs.net@acidbong:envs.netthx16:49:59
@acidbong:envs.net@acidbong:envs.netdoes nix-community's cachix still provides emacs packages?17:53:40
@acidbong:envs.net@acidbong:envs.net(also, only for Motif Emacs or GTK/PGTK as well?)17:54:27
@acidbong:envs.net@acidbong:envs.net * does nix-community's cachix still provide emacs packages?17:54:35
@imperivohaace:matrix.orgУзумакиI dunno when I've seen a package pulled from cache17:58:43
@imperivohaace:matrix.orgУзумаки I'm always compiling it seemingly 17:59:01
@imperivohaace:matrix.orgУзумаки
In reply to @imperivohaace:matrix.org
I'm always compiling it seemingly
All of the emacs package I mean
17:59:15
@imperivohaace:matrix.orgУзумакиBut emacs pgtk itself is a cache hit17:59:44
@me:linj.techlinjthere is no cache for emacs pgtk's elisp package set18:24:25
14 Dec 2024
@zororg:matrix.orgzororgrelated issue: https://github.com/NixOS/nixpkgs/issues/32491206:44:09
15 Dec 2024
@noahmyla:matrix.orgnoh myla joined the room.12:04:02
@msanft:matrix.orgMoritz Sanft joined the room.16:27:27
16 Dec 2024
@starlit:crossbach.destarlit joined the room.10:13:23
@starlit:crossbach.destarlit

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:crossbach.destarlit *

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:crossbach.destarlit

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:crossbach.destarlit *

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

Show newer messages


Back to Room ListRoom Version: 6