!SlMumQZnFjwLRjWFbW:nixos.org

Nix + Doom Emacs

229 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)
In reply to @mon:tchncs.de
why would that be non-standard? a lot of the packages i'm using do that
There is no standard to expose functions in Flakes yet
17:04:45
@k0kada:matrix.orgk0kada (he/him) Even output.lib is non-standard 17:04:55
@k0kada:matrix.orgk0kada (he/him) * Even outputs.lib is non-standard 17:05:02
@mon:tchncs.deribosomerocker
In reply to@k0kada:matrix.org
There is no standard to expose functions in Flakes yet
ah, yeah nothing i use exposes functions
17:05:24
@k0kada:matrix.orgk0kada (he/him) BTW, package/packages should expose derivations, not functions either (so our usage is non-standard too) 17:05:32
@mon:tchncs.deribosomerocker except yknow, nix-doom-emacs which uses a function for package 17:05:34
@mon:tchncs.deribosomerocker yeah i know lol 17:05:42
@mon:tchncs.deribosomerocker hmmm... how about an overridable package? isn't that close to what your default.nix does or no? 17:06:34
@k0kada:matrix.orgk0kada (he/him)

So what I am thinking to do is:

  • outputs.packages will expose a proper full derivation of NDE (probably useless because it will use a default config or something, but I think it serves as a playground for people to test)
  • outputs.mkNixDoomEmacsDrv (name TBD) will expose the default.nix as a proper function
  • outputs.hmModule will stay since there is no standard for this
17:07:27
@k0kada:matrix.orgk0kada (he/him)
In reply to @mon:tchncs.de
hmmm... how about an overridable package? isn't that close to what your default.nix does or no?
Actually this is a good point
17:07:48
@k0kada:matrix.orgk0kada (he/him)As long this doesn't cause another weird IFD I can try17:08:30
@mon:tchncs.deribosomerocker i don't see a reason why it does :P 17:08:43
@mon:tchncs.deribosomerocker * i don't see a reason why it would :P 17:08:51
@k0kada:matrix.orgk0kada (he/him) (Probably not because nixpkgs.lib.mkOverridable should exist) 17:08:51
@k0kada:matrix.orgk0kada (he/him)Ah oh, forget what I said17:09:56
@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

Show newer messages


Back to Room ListRoom Version: 9