!SlMumQZnFjwLRjWFbW:nixos.org

Nix + Doom Emacs

208 Members
Running Doom Emacs with Nix | You probably want https://github.com/nix-community/nix-doom-emacs44 Servers

Load older messages


SenderMessageTime
8 Sep 2022
@mon:tchncs.deribosomerocker also, i wonder... can't you make the emacsPackagesOverlay into a list instead of overlay? I think it might be more understandable and usable to everyone 17:21:52
@mon:tchncs.deribosomerocker
      emacsPackagesOverlay = self: super: {
        idris2-mode = self.trivialBuild {
          pname = "idris2-mode";
          ename = "idris2-mode";
          version = "0.0.0";
          buildInputs = [ self.prop-menu ];
          src = pkgs.fetchFromGitHub {
            owner = "idris-community";
            repo = "idris2-mode";
            rev = "4a3f9cdb1a155da59824e39f0ac78ccf72f2ca97";
            sha256 = "sha256-TxsGaG2fBRWWP9aas59kiNnUVD4ZdNlwwaFbM4+n81c=";
          };
        };
      };

would turn into

      emacsPackages = [
        {
          idris2-mode = self.trivialBuild {
            pname = "idris2-mode";
            ename = "idris2-mode";
            version = "0.0.0";
            buildInputs = [ self.prop-menu ];
            src = pkgs.fetchFromGitHub {
              owner = "idris-community";
              repo = "idris2-mode";
              rev = "4a3f9cdb1a155da59824e39f0ac78ccf72f2ca97";
              sha256 = "sha256-TxsGaG2fBRWWP9aas59kiNnUVD4ZdNlwwaFbM4+n81c=";
            };
          };
      };
17:23:32
@mon:tchncs.deribosomerocker *
      emacsPackagesOverlay = self: super: {
        idris2-mode = self.trivialBuild {
          pname = "idris2-mode";
          ename = "idris2-mode";
          version = "0.0.0";
          buildInputs = [ self.prop-menu ];
          src = pkgs.fetchFromGitHub {
            owner = "idris-community";
            repo = "idris2-mode";
            rev = "4a3f9cdb1a155da59824e39f0ac78ccf72f2ca97";
            sha256 = "sha256-TxsGaG2fBRWWP9aas59kiNnUVD4ZdNlwwaFbM4+n81c=";
          };
        };
      };

would turn into

      emacsPackages = [
        {
          idris2-mode = trivialBuild {
            pname = "idris2-mode";
            ename = "idris2-mode";
            version = "0.0.0";
            buildInputs = [ prop-menu ];
            src = pkgs.fetchFromGitHub {
              owner = "idris-community";
              repo = "idris2-mode";
              rev = "4a3f9cdb1a155da59824e39f0ac78ccf72f2ca97";
              sha256 = "sha256-TxsGaG2fBRWWP9aas59kiNnUVD4ZdNlwwaFbM4+n81c=";
            };
          };
      };
17:24:11
@mon:tchncs.deribosomerockerbecause as I see it, one of the other non-standard things NDE does is use an overlay to add additional packages rather than just a list of packages17:24:57
@mon:tchncs.deribosomerockere.g. zsh uses a list of derivations for plugins in home-manager17:25:11
@k0kada:matrix.orgk0kada (he/him) You mean emacsPackages = [ trivialBuild { ... } ] right? 17:26:06
@k0kada:matrix.orgk0kada (he/him) * You mean emacsPackages = [ trivialBuild { ... } ]; right? 17:26:10
@k0kada:matrix.orgk0kada (he/him) * You mean emacsPackages = [ (trivialBuild { ... }) ]; right? 17:26:17
@k0kada:matrix.orgk0kada (he/him) But no, this is the API from nixpkgs actually 17:26:28
@k0kada:matrix.orgk0kada (he/him)We could change it, but seems arbitrary17:26:38
@mon:tchncs.deribosomerocker i see 17:26:48
@mon:tchncs.deribosomerocker what does the trivial in trivialBuild mean, specifically? is it just a simple build or something? also, does trivialBuild only work for emacs packages or is it for everything? 17:34:26
@k0kada:matrix.orgk0kada (he/him)
$ rg "trivialBuild ="
81:    trivialBuild = pkgs.callPackage ../build-support/emacs/trivial.nix {
17:35:38
@mon:tchncs.deribosomerocker ah, thanks 17:35:56
@k0kada:matrix.orgk0kada (he/him) And for what it means, without looking at the code I assume that it doesn't need any kinda of metadata like the melpaBuild for example 17:36:31
@mon:tchncs.deribosomerocker hmmm... does Nix-Doom-Emacs always only write to ~/.emacs.d/init.el by default? I really want to put as much as I can into ~/.config/, and emacs already supports ~/.config/emacs, shouldn't that be preferred as the default directory just like emacs does? 17:55:27
@mon:tchncs.deribosomerocker
In reply to@k0kada:matrix.org
This does looks like either an issue with nixpkgs or emacs-overlay
about this problem, do you think the issue could be that i had vterm installed like programs.emacs.extraPackages = epkgs: with epkgs; [ vterm ];?
17:59:46
@mon:tchncs.deribosomerocker

is

programs.doom-emacs = {
  # ...
  emacsPackagesOverlay = self: super: {
    vterm = super.vterm;
   };
};

the way to do it?

18:01:08
@k0kada:matrix.orgk0kada (he/him)
In reply to @mon:tchncs.de
hmmm... does Nix-Doom-Emacs always only write to ~/.emacs.d/init.el by default? I really want to put as much as I can into ~/.config/, and emacs already supports ~/.config/emacs, shouldn't that be preferred as the default directory just like emacs does?
If you care about this too much, you can probably open a PR
18:08:23
@k0kada:matrix.orgk0kada (he/him)
In reply to @mon:tchncs.de

is

programs.doom-emacs = {
  # ...
  emacsPackagesOverlay = self: super: {
    vterm = super.vterm;
   };
};

the way to do it?

This seems to be doing nothing
18:08:58
@k0kada:matrix.orgk0kada (he/him)About the issue, I think the problem is in nixpkgs or emacs-overlay itself18:09:28
@k0kada:matrix.orgk0kada (he/him)Shouldn't be difficult to fix18:09:38
@mon:tchncs.deribosomerockerah, alright18:10:19
@mon:tchncs.deribosomerocker I'm currently populating the FAQ with some nice questions 18:10:36
@mon:tchncs.deribosomerocker
{ config, nixpkgs, lib, inputs }: {
  # ...
  environment.systemPackages = 
    let
      doom-emacs = inputs.nix-doom-emacs.packages.${system}.default.override {
        doomPrivateDir = ./doom;
      };
    in [
      doom-emacs
    ];
  # ...
}

I have this as a standalone example that uses overrides

18:29:11
@mon:tchncs.deribosomerocker this is good, right? 18:30:25
@mon:tchncs.deribosomerocker https://github.com/nix-community/nix-doom-emacs/pull/266 here you go, guys 18:55:31
@k0kada:matrix.orgk0kada (he/him)
In reply to @mon:tchncs.de
about this problem, do you think the issue could be that i had vterm installed like programs.emacs.extraPackages = epkgs: with epkgs; [ vterm ];?
I think I found the issue
19:08:06
@k0kada:matrix.orgk0kada (he/him)Well, actually it seems to works fine for me19:15:07
@k0kada:matrix.orgk0kada (he/him) I just uncomented the vterm module inside NDE itself and there was no issue during build 19:15:41

Show newer messages


Back to Room ListRoom Version: 9