Exposing it as a package was (at least according to `nix flake check`) incorrect. This means we now use the user's nixpkgs's `pkgs.callPackage` instead of our own, but I think that's ok.
45 lines
1.6 KiB
Nix
45 lines
1.6 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "nixpkgs";
|
|
doomemacs = {
|
|
url = "github:doomemacs/doomemacs";
|
|
flake = false;
|
|
};
|
|
emacs-overlay = {
|
|
url = "github:nix-community/emacs-overlay";
|
|
inputs = {
|
|
nixpkgs-stable.follows = "nixpkgs";
|
|
};
|
|
};
|
|
};
|
|
|
|
outputs = { doomemacs, nixpkgs, emacs-overlay, ... }: let
|
|
systems = [ "x86_64-linux" ];
|
|
perSystemPackages = f: nixpkgs.lib.genAttrs systems (system: f nixpkgs.legacyPackages.${system});
|
|
in {
|
|
packages = perSystemPackages (pkgs:
|
|
let
|
|
common = {
|
|
doomSource = doomemacs;
|
|
emacs = pkgs.emacs29-pgtk;
|
|
doomLocalDir = "~/.local/share/nix-doom-unstraightened";
|
|
};
|
|
pkgsWithEmacsOverlay = pkgs.extend emacs-overlay.overlays.package;
|
|
in {
|
|
# Current Doom + NixOS 23.11 requires emacs-overlay: Doom pins
|
|
# emacs-fish-completion, which moved from gitlab to github recently
|
|
# enough stable nixpkgs pulls it from the wrong source.
|
|
doom-minimal = pkgsWithEmacsOverlay.callPackage ./doom.nix (common // { doomDir = pkgs.emptyDirectory; });
|
|
doom-full = pkgsWithEmacsOverlay.callPackage ./doom.nix (common // { full = true; doomDir = pkgs.emptyDirectory; });
|
|
doom-example = pkgsWithEmacsOverlay.callPackage ./doom.nix (common // { doomDir = ./example; });
|
|
});
|
|
overlays.default = final: prev:
|
|
let
|
|
pkgs = final.extend emacs-overlay.overlays.package;
|
|
in {
|
|
doomEmacs = args: pkgs.callPackage ./doom.nix ({
|
|
doomSource = doomemacs;
|
|
} // args);
|
|
};
|
|
};
|
|
}
|