Expose experimentalFetchTree in home-manager
This should work around #14, which breaks fetches on newer versions of Nix. I was hesitant to expose this as Nix changes may break things with no warning, but it gives users already willing to run newer versions of Nix a workaround for the fetch failures they're currently getting. (And the feature itself seems to work fine on current Nix, since CI is using it...)
This commit is contained in:
parent
ceb72ac458
commit
0fb952b3ce
2 changed files with 29 additions and 1 deletions
|
|
@ -19,6 +19,10 @@ Doom Emacs and (almost) all module dependencies.
|
||||||
Not yet tested on macOS. Likely works as long as you do not need an "app" (you
|
Not yet tested on macOS. Likely works as long as you do not need an "app" (you
|
||||||
launch Emacs from the commandline or through other means). I intend to fix this.
|
launch Emacs from the commandline or through other means). I intend to fix this.
|
||||||
|
|
||||||
|
You may encounter "Cannot find Git revision" errors on Nix versions newer than
|
||||||
|
2.18.x (see #14). Try enabling `experimentalFetchTree` to work around this (see
|
||||||
|
below).
|
||||||
|
|
||||||
Please report any issues.
|
Please report any issues.
|
||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
|
|
@ -177,6 +181,10 @@ support use without flakes.
|
||||||
For example to include Emacs package `treesit-grammars.with-all-grammars`:
|
For example to include Emacs package `treesit-grammars.with-all-grammars`:
|
||||||
`extraPackages = epkgs: [ epkgs.treesit-grammars.with-all-grammars ];`.
|
`extraPackages = epkgs: [ epkgs.treesit-grammars.with-all-grammars ];`.
|
||||||
|
|
||||||
|
- `experimentalFetchTree`: fetch packages using `fetchTree`, which is more
|
||||||
|
efficient but considered experimental in Nix (subject to changes which might
|
||||||
|
break fetches).
|
||||||
|
|
||||||
There are a few other settings but they are not typically useful. See the
|
There are a few other settings but they are not typically useful. See the
|
||||||
source.
|
source.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,25 @@ in {
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
experimentalFetchTree = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
example = true;
|
||||||
|
description = ''
|
||||||
|
Fetch packages using fetchTree instead of fetchGit.
|
||||||
|
|
||||||
|
This makes use of Nix's "github" fetcher, which is more efficient:
|
||||||
|
it fetches tarballs generated by GitHub instead of using git.
|
||||||
|
|
||||||
|
It is not enabled by default because that fetcher is still "subject
|
||||||
|
to change" according to Nix's documentation.
|
||||||
|
|
||||||
|
This should be safe to enable, as long as you remember to disable it
|
||||||
|
if you encounter fetch issues, especially if they start after an
|
||||||
|
upgrade of Nix.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
finalEmacsPackage = mkOption {
|
finalEmacsPackage = mkOption {
|
||||||
type = types.package;
|
type = types.package;
|
||||||
visible = false;
|
visible = false;
|
||||||
|
|
@ -138,7 +157,8 @@ in {
|
||||||
config = mkIf cfg.enable (mkMerge [
|
config = mkIf cfg.enable (mkMerge [
|
||||||
(let
|
(let
|
||||||
doomPackages = doomFromPackages pkgs {
|
doomPackages = doomFromPackages pkgs {
|
||||||
inherit (cfg) emacs doomDir doomLocalDir profileName noProfileHack extraPackages;
|
inherit (cfg) emacs doomDir doomLocalDir profileName noProfileHack extraPackages
|
||||||
|
experimentalFetchTree;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue