diff --git a/README.md b/README.md index ab9deb5..5835d7b 100644 --- a/README.md +++ b/README.md @@ -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 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. ## How to use @@ -177,6 +181,10 @@ support use without flakes. For example to include Emacs package `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 source. diff --git a/home-manager.nix b/home-manager.nix index 944f7b0..f841acb 100644 --- a/home-manager.nix +++ b/home-manager.nix @@ -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 { type = types.package; visible = false; @@ -138,7 +157,8 @@ in { config = mkIf cfg.enable (mkMerge [ (let doomPackages = doomFromPackages pkgs { - inherit (cfg) emacs doomDir doomLocalDir profileName noProfileHack extraPackages; + inherit (cfg) emacs doomDir doomLocalDir profileName noProfileHack extraPackages + experimentalFetchTree; }; in {