nix-community / nix-doom-emacs

doom-emacs packaged for Nix [maintainers=@thiagokokada]
MIT License
213 stars 43 forks source link

feat: add doomModules option #467

Open roman opened 1 year ago

roman commented 1 year ago

Context

As a doom-emacs user I want to distribute my doom modules as nix derivations So that I can include them in multiple configurations of doom.d that do not require my personal config

Rationale

I would like to have a way to offer my personal doom-emacs modules as a git repository that later can be included in nix-doom-emacs installation. By using the new lib.mkDoomModules, I can easily create a derivation that contains the modules I want included on a doom.d folder that gets constructed using nix-doom-emacs.

ckiee commented 1 year ago

The diff looks reasonable at a first glance, but frankly I am scared of even more things to maintain when I'm using a 2022 version of NDE, and @thiagokokada is using bare un-nixified Doom due to the various current issues with this project.

I like to blame #353 for the majority of problems, but Doom & Emacs are also just giant things to package correctly.

How has NDE been working for you? I'm surprised it hasn't exploded more for you.

roman commented 1 year ago

The diff looks reasonable at a first glance

Thanks, I would be more comfortable if I added some testing. I have not dug into how the CI tests of this project work to see if I can add a new one; I'll check that out.

I am scared of even more things to maintain when I'm using a 2022 version of NDE

I understand. I can run my projects with my fork for a while with no problem and ask other interested parties to experiment with my branch as well. Luckily is simple to work with forks in nix flakes inputs. I wonder what is stopping you with working with the master version?

@thiagokokada is using bare un-nixified Doom due to the various current issues with this project.

Ooof

How has NDE been working for you? I'm surprised it hasn't exploded more for you.

On NixOS, I didn't have many issues. On macOS, I struggled a little, and that's why I created the evil-collections flake input PR (#466)

quinn-dougherty commented 7 months ago

This seems cool! Can it be expected to help with https://github.com/nix-community/nix-doom-emacs/issues/421 / https://github.com/nix-community/nix-doom-emacs/issues/324 ?

quinn-dougherty commented 7 months ago

Tried building with my doom.d, with the following flake

{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs";
    nix-doom-emacs.url = "github:roman/nix-doom-emacs/roman/feat/doom-modules";
  };
  outputs = { self, nixpkgs, nix-doom-emacs }:
    let
      system = "x86_64-linux";
      pkgs = import nixpkgs { inherit system; };
      doom-emacs = nix-doom-emacs.packages.${system}.default.override {
        doomPrivateDir = ./doom.d;
      };
    in
    {
      devShells.${system}.default = pkgs.mkShell {
        buildInputs = [ doom-emacs ];
      };
    };
}

got this:

error: attribute 'evil-collection' missing
ckiee commented 7 months ago

This seems cool! Can it be expected to help with # 421 / #324 ?

@quinn-dougherty No, not directly. This comes before the bottleneck build steps.