Use emacs-overlay
(again)
This commit is contained in:
parent
4d3e1178aa
commit
75774f805a
4 changed files with 120 additions and 29 deletions
104
flake.lock
generated
104
flake.lock
generated
|
@ -1,5 +1,25 @@
|
|||
{
|
||||
"nodes": {
|
||||
"emacs-overlay": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1702399955,
|
||||
"narHash": "sha256-FnB5O1RVFzj3h7Ayf7UxFnOL1gsJuG6gn1LCTd9dKFs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "47798c4ab07d5f055bb2625010cf6d8e3f384923",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"extra-package-agenix-el": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -151,10 +171,28 @@
|
|||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701680307,
|
||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hercules-ci-effects": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_2",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701009247,
|
||||
|
@ -172,11 +210,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1697723726,
|
||||
"narHash": "sha256-SaTWPkI8a5xSHX/rrKzUe+/uVNy6zCGMXgoeMb7T9rg=",
|
||||
"lastModified": 1702151865,
|
||||
"narHash": "sha256-9VAt19t6yQa7pHZLDbil/QctAgVsA66DLnzdRGqDisg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7c9cc5a6e5d38010801741ac830a3f8fd667a7a0",
|
||||
"rev": "666fc80e7b2afb570462423cb0e1cf1a3a34fedd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -204,13 +242,45 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1702151865,
|
||||
"narHash": "sha256-9VAt19t6yQa7pHZLDbil/QctAgVsA66DLnzdRGqDisg=",
|
||||
"lastModified": 1702221085,
|
||||
"narHash": "sha256-Br3GCSkkvkmw46cT6wCz6ro2H1WgDMWbKE0qctbdtL0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "666fc80e7b2afb570462423cb0e1cf1a3a34fedd",
|
||||
"rev": "c2786e7084cbad90b4f9472d5b5e35ecb57958af",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-23.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1697723726,
|
||||
"narHash": "sha256-SaTWPkI8a5xSHX/rrKzUe+/uVNy6zCGMXgoeMb7T9rg=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7c9cc5a6e5d38010801741ac830a3f8fd667a7a0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1703013332,
|
||||
"narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -222,6 +292,7 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"emacs-overlay": "emacs-overlay",
|
||||
"extra-package-agenix-el": "extra-package-agenix-el",
|
||||
"extra-package-chatgpt": "extra-package-chatgpt",
|
||||
"extra-package-combobulate": "extra-package-combobulate",
|
||||
|
@ -231,7 +302,22 @@
|
|||
"extra-package-notmuch-notify": "extra-package-notmuch-notify",
|
||||
"flake-parts": "flake-parts",
|
||||
"hercules-ci-effects": "hercules-ci-effects",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
13
flake.nix
13
flake.nix
|
@ -4,6 +4,7 @@
|
|||
inputs = {
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
emacs-overlay.url = "github:nix-community/emacs-overlay";
|
||||
hercules-ci-effects.url = "github:hercules-ci/hercules-ci-effects";
|
||||
extra-package-indent-bars = {
|
||||
url = "github:jdtsmith/indent-bars";
|
||||
|
@ -33,12 +34,6 @@
|
|||
url = "github:firmart/notmuch-notify";
|
||||
flake = false;
|
||||
};
|
||||
# TODO: use from MELPA when v0.7.5 reaches it
|
||||
# https://github.com/tumashu/vertico-posframe/issues/36
|
||||
extra-package-vertico-posframe = {
|
||||
url = "github:tumashu/vertico-posframe";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs @ {flake-parts, ...}:
|
||||
|
@ -53,4 +48,10 @@
|
|||
./ci
|
||||
];
|
||||
};
|
||||
|
||||
# Not hitting it
|
||||
# nixConfig = {
|
||||
# extra-substituters = ["https://nix-community.cachix.org"];
|
||||
# extra-trusted-public-keys = ["nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="];
|
||||
# };
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
value = input;
|
||||
}) (lib.filterAttrs (inputName: _: ! builtins.isNull (builtins.match "extra-package-.*" inputName)) inputs);
|
||||
})
|
||||
inputs.emacs-overlay.overlays.package
|
||||
# Some tree-sitter grammars in nixpksg are built with a too new ABI
|
||||
# https://github.com/NixOS/nixpkgs/issues/209114
|
||||
# (_: _: {
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
pkgs: epkgs:
|
||||
with epkgs; let
|
||||
pkgs: epkgs: let
|
||||
inherit (pkgs) lib;
|
||||
inherit (epkgs) melpaPackages nongnuPackages elpaPackages;
|
||||
|
||||
depsPerPackage = {
|
||||
indent-bars = [compat];
|
||||
chatgpt = [polymode];
|
||||
copilot = [editorconfig dash s];
|
||||
notmuch-notify = [alert notmuch];
|
||||
vertico-posframe = [posframe vertico];
|
||||
indent-bars = [elpaPackages.compat];
|
||||
chatgpt = [melpaPackages.polymode];
|
||||
copilot = [melpaPackages.editorconfig melpaPackages.dash melpaPackages.s];
|
||||
notmuch-notify = [melpaPackages.alert melpaPackages.notmuch];
|
||||
};
|
||||
|
||||
overrideAttrsPerPackage = {
|
||||
|
@ -21,7 +20,7 @@ with epkgs; let
|
|||
# *Attrset* containig extra emacs packages from flake inputs
|
||||
extraPackages = lib.mapAttrs (inputName: input: let
|
||||
deps = depsPerPackage.${inputName} or [];
|
||||
build = trivialBuild {
|
||||
build = epkgs.trivialBuild {
|
||||
pname = inputName;
|
||||
src = input.outPath;
|
||||
version = input.shortRev;
|
||||
|
@ -37,7 +36,7 @@ with epkgs; let
|
|||
builtins.filter
|
||||
# if an extra package has the same name then give precedence to it
|
||||
(package: ! builtins.elem package.pname (builtins.attrNames extraPackages))
|
||||
[
|
||||
(with epkgs.melpaPackages; [
|
||||
meow
|
||||
dracula-theme
|
||||
modus-themes
|
||||
|
@ -48,7 +47,6 @@ with epkgs; let
|
|||
nerd-icons-dired
|
||||
ligature
|
||||
treemacs-nerd-icons
|
||||
eat
|
||||
eshell-syntax-highlighting
|
||||
fish-completion # fish completion for eshell
|
||||
eshell-prompt-extras
|
||||
|
@ -57,7 +55,6 @@ with epkgs; let
|
|||
sideline
|
||||
sideline-flymake
|
||||
rainbow-delimiters
|
||||
delight
|
||||
vertico
|
||||
marginalia
|
||||
consult
|
||||
|
@ -71,8 +68,6 @@ with epkgs; let
|
|||
with-editor
|
||||
diff-hl
|
||||
corfu
|
||||
corfu-terminal
|
||||
kind-icon
|
||||
cape
|
||||
which-key
|
||||
nix-mode
|
||||
|
@ -89,6 +84,7 @@ with epkgs; let
|
|||
haskell-mode
|
||||
terraform-mode
|
||||
diredfl
|
||||
org-modern
|
||||
org-roam
|
||||
visual-fill-column
|
||||
consult-org-roam
|
||||
|
@ -97,6 +93,13 @@ with epkgs; let
|
|||
eldoc-box
|
||||
go-translate
|
||||
notmuch
|
||||
];
|
||||
]) ++ (with elpaPackages; [
|
||||
delight
|
||||
kind-icon
|
||||
vertico-posframe
|
||||
]) ++ (with nongnuPackages; [
|
||||
eat
|
||||
corfu-terminal
|
||||
]);
|
||||
in
|
||||
mainPackages ++ (builtins.attrValues extraPackages)
|
||||
|
|
Reference in a new issue