Closed bbigras closed 4 years ago
For me it was because i didn't had home-manager
in my nix channels
see here
maybe this could be checked and a sane error could be written
fixed this by doing
$ nix-channel --add https://github.com/rycee/home-manager/archive/master.tar.gz home-manager
$ nix-channel --update
I disabled the "Failed to load Home Manager Options cache file" error and added a message recommending to run mhhf's snippet when building home-manager options cache fails.
In the future I might attempt at supporting home-manager installed through configuration.nix without this workaround.
It's weird, I still see "Failed to update Home Manager Options".
manix 0.6.2
nix-config on master [⇕$!?] via ❄️ impure took 14s [5/1104]
❯ nix-channel --add https://github.com/rycee/home-manager/archive/master.tar.gz home-manager && nix-channel --update
these derivations will be built:
/nix/store/dnczh8jgdxhys9ky2m0vlqq00kggd8yy-home-manager.drv
building '/nix/store/dnczh8jgdxhys9ky2m0vlqq00kggd8yy-home-manager.drv'...
unpacking channels...
created 1 symlinks in user environment
nix-config on master [⇕$!?] via ❄️ impure
❯ manix notmuch nix-shell
Here's what I found in nixpkgs: notmuch-bower haskellPackages.notmuch-haskell haskellPackages.notmuch-web haskellPackages.notmuch pkgsTargetTarget.notmuch-bower pkgsTargetTarget.notmuch-mutt pkgsTargetTarget.no
tmuch-addrlookup pkgsTargetTarget.notmuch notmuch-mutt pypy2Packages.notmuch pkgsBuildHost.notmuch pkgsBuildHost.notmuch-addrlookup pkgsBuildHost.notmuch-mutt pkgsBuildHost.notmuch-bower notmuch pypyPackages.no
tmuch python27Packages.notmuch pkgsBuildTarget.notmuch-mutt pkgsBuildTarget.notmuch pkgsBuildTarget.notmuch-bower pkgsBuildTarget.notmuch-addrlookup pkgsMusl.notmuch-mutt pkgsMusl.notmuch-addrlookup pkgsMusl.no
tmuch pkgsMusl.notmuch-bower pkgsStatic.notmuch pkgsStatic.notmuch-bower pkgsStatic.notmuch-mutt pkgsStatic.notmuch-addrlookup python2Packages.notmuch python38Packages.notmuch pythonPackages.notmuch pkgsHostHos
t.notmuch-mutt pkgsHostHost.notmuch-bower pkgsHostHost.notmuch pkgsHostHost.notmuch-addrlookup pkgsi686Linux.notmuch-addrlookup pkgsi686Linux.notmuch-bower pkgsi686Linux.notmuch pkgsi686Linux.notmuch-mutt pytho
n36Packages.notmuch notmuch-addrlookup buildPackages.notmuch-bower buildPackages.notmuch buildPackages.notmuch-mutt buildPackages.notmuch-addrlookup python39Packages.notmuch emacs26Packages.notmuch-labeler emac
s26Packages.notmuch emacs26Packages.notmuch-bookmarks and 38 more.
nix-config on master [⇕$!?] via ❄️ impure
❯ manix notmuch -u nix-shell
Building Home Manager Options cache...
Failed to update Home Manager Options
Caused by:
0: Failed to perform IO on a cache file
1: No such file or directory (os error 2)
Tip: If you installed your home-manager through configuration.nix you can fix this error by adding the home-manager channel with this command: nix-channel --add https://github.com/rycee/home-manager/archive/mas
ter.tar.gz home-manager && nix-channel --update
Building NixOS Options cache...
Building Nixpkgs Tree cache...
Building Nixpkgs Documentation cache...
Here's what I found in nixpkgs: python36Packages.notmuch pypy27Packages.notmuch emacsPackages.counsel-notmuch emacsPackages.notmuch-labeler emacsPackages.notmuch-bookmarks emacsPackages.notmuch emacsPackages.he
lm-notmuch emacsPackagesNg.notmuch-bookmarks emacsPackagesNg.helm-notmuch emacsPackagesNg.notmuch emacsPackagesNg.counsel-notmuch emacsPackagesNg.notmuch-labeler pkgsi686Linux.notmuch-mutt pkgsi686Linux.notmuch
-bower pkgsi686Linux.notmuch-addrlookup pkgsi686Linux.notmuch pkgsHostTarget.notmuch pkgsHostTarget.notmuch-addrlookup pkgsHostTarget.notmuch-mutt pkgsHostTarget.notmuch-bower python27Packages.notmuch python39P
ackages.notmuch emacs26Packages.counsel-notmuch emacs26Packages.notmuch emacs26Packages.helm-notmuch emacs26Packages.notmuch-bookmarks emacs26Packages.notmuch-labeler __splicedPackages.notmuch __splicedPackages
.notmuch-addrlookup __splicedPackages.notmuch-bower __splicedPackages.notmuch-mutt pkgsTargetTarget.notmuch pkgsTargetTarget.notmuch-addrlookup pkgsTargetTarget.notmuch-mutt pkgsTargetTarget.notmuch-bower notmu
ch pypy3Packages.notmuch buildPackages.notmuch-addrlookup buildPackages.notmuch buildPackages.notmuch-bower buildPackages.notmuch-mutt python38Packages.notmuch pkgsStatic.notmuch-addrlookup pkgsStatic.notmuch-m
utt pkgsStatic.notmuch-bower pkgsStatic.notmuch pypyPackages.notmuch pypy2Packages.notmuch pythonPackages.notmuch pkgsHostHost.notmuch-addrlookup and 38 more.
@bbigras could you try running this command:
find "$(nix-build -E "{ pkgs ? import <nixpkgs> {} }:
let
hmargs = { pkgs = pkgs; lib = import (<home-manager/modules/lib/stdlib-extended.nix>) pkgs.lib; };
docs = import (<home-manager/doc>) hmargs;
in (if builtins.isFunction docs then docs hmargs else docs).options.json")"
and paste the output?
[bbigras@desktop:~]$ find "$(nix-build -E "{ pkgs ? import <nixpkgs> {} }:
> let
> hmargs = { pkgs = pkgs; lib = import (<home-manager/modules/lib/stdlib-extended.nix>) pkgs.lib; };
> docs = import (<home-manager/doc>) hmargs;
> in (if builtins.isFunction docs then docs hmargs else docs).options.json")"
error: file 'home-manager/doc' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):4:32
find: ‘’: No such file or directory
Strange. I can't reproduce your error, not sure if I'll be able to help. Maybe try running it in a new terminal so your environment variables are updated.
Sorry. Rebooting fixed it. I tried in a new terminal but maybe I had to log out and log back in. Thanks.
I don't know if it's related but I'm using
home-manager.users
to use home-manager in my configuration.nix. And I'm usingniv
so I don't have any home-manager channel.manix 1272c45ac2b4f07c74702e8bd9417d3bbfcab56b
"x86_64-linux"
Linux 5.7.10-zen1, NixOS, 20.09pre-git (Nightingale)
yes
yes
nix-env (Nix) 2.3.7
"nixos-20.09pre237686.96069f7d890"
/run/current-system/nixpkgs