!SlMumQZnFjwLRjWFbW:nixos.org

Nix + Doom Emacs

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

Load older messages


SenderMessageTime
8 Sep 2022
@k0kada:matrix.orgk0kada (he/him) It is a pkgs.callPackage 17:10:02
@k0kada:matrix.orgk0kada (he/him)Huh....17:10:04
@k0kada:matrix.orgk0kada (he/him)Well, let's hope for the best :P17:10:15
@mon:tchncs.deribosomerockerwhat would you say are the suggested ways to install NDE? #1 flakes + hm, #2 non-flake + hm, #3 flake/non-flake nixos without HM?17:12:15
@k0kada:matrix.orgk0kada (he/him)#1 and #2 looks correct17:14:45
@k0kada:matrix.orgk0kada (he/him)#3 would be standalone usage in general17:14:55
@k0kada:matrix.orgk0kada (he/him)Could be NixOS/Nix-darwin/nix-shell/etc.17:15:15
@k0kada:matrix.orgk0kada (he/him)(You don't need to write every one of them, just give an example of derivation that works everywhere)17:15:40
@k0kada:matrix.orgk0kada (he/him) * (You don't need to write every one of them, just give an example of .nix that works everywhere) 17:15:53
@mon:tchncs.deribosomerocker 👍️, though i'm not sure how it'll turn out, so i'll wait until you get the implementation done to see how to do it 17:18:25
@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

Show newer messages


Back to Room ListRoom Version: 9