Updating the latest unstable channel, home manager doesn't build anymore. Here are the logs
trace: types.loaOf has been removed and mixing lists with attribute values
is no longer possible; please use types.attrsOf instead.
See https://github.com/NixOS/nixpkgs/issues/1800 for the motivation.
these derivations will be built:
/nix/store/0v2pwmpjm3rfdn1imzffp6c30dx4hfvm-manual-combined.drv
/nix/store/0xkiy24j3xc5xvzshg57g6fmjhvp7sxf-manual-olinkdb.drv
/nix/store/hzxx7qscdim6w2jc7zlids0ld6jdj2d4-man-pages.drv
/nix/store/45p3nxvj23xwngdf9frdlh1mf78xvyky-man-pages-fish-completions.drv
/nix/store/wb5xpsliz02ibmvhjwym5m0xb4cn0gvw-neovim-0.4.4.drv
/nix/store/dzfzms49h83dvxb3vqgjdvsji4r7j49d-neovim-0.4.4-fish-completions.drv
/nix/store/4w950gn1myfj8rgibm7xgiaqwxggfjf2-raphael-fish-completions.drv
/nix/store/rhv7yvk8ffsdq4pxp7yvfj21asa5i229-home-manager-path.drv
/nix/store/vdd7pp9vjnh10bz5immhayivf4pkcj0d-activation-script.drv
/nix/store/y631s1jz0z1f52y3hypqpcw3w7gsmsy5-home-manager-files.drv
/nix/store/xbahw25n43gy42w0qm9agc8v2f81m66d-home-manager-generation.drv
building '/nix/store/wb5xpsliz02ibmvhjwym5m0xb4cn0gvw-neovim-0.4.4.drv'...
building '/nix/store/0v2pwmpjm3rfdn1imzffp6c30dx4hfvm-manual-combined.drv'...
Generating remote plugin manifest
/nix/store/d4gdyn7qk2v83l17ay7qnarbrydf6q8g-manual-combined/manual-combined.xml:9206: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-home.file._name__.source"
9202
9203
9204
9205
9206 The
9207 hidden, that is, having a name starting with the
9208 also allows the source file name to contain characters not typically
/nix/store/d4gdyn7qk2v83l17ay7qnarbrydf6q8g-manual-combined/manual-combined.xml fails to validate
builder for '/nix/store/0v2pwmpjm3rfdn1imzffp6c30dx4hfvm-manual-combined.drv' failed with exit code 3
cannot build derivation '/nix/store/hzxx7qscdim6w2jc7zlids0ld6jdj2d4-man-pages.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/rhv7yvk8ffsdq4pxp7yvfj21asa5i229-home-manager-path.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/45p3nxvj23xwngdf9frdlh1mf78xvyky-man-pages-fish-completions.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/xbahw25n43gy42w0qm9agc8v2f81m66d-home-manager-generation.drv': 1 dependencies couldn't be built
error: build of '/nix/store/xbahw25n43gy42w0qm9agc8v2f81m66d-home-manager-generation.drv' failed
@cole-h the warning I get, seems to be related to a commit you made. It looks like you fixed what the message complains about. Perhaps the latest channel hasn't caught up with master?
"x86_64-darwin"Darwin 19.6.0, macOS 10.15.6nononix-env (Nix) 2.3.7"darwin, home-manager, nixpkgs-20.09pre242495.3c0e3697520, nixpkgs-unstable-20.09pre242495.3c0e3697520"/Users/raphael/.nix-defexpr/channels/nixpkgsIf you're using home-manager from master, you probably need to update your home-manager channel. The commit I made actually fixed this issue.
I also tried to update the channel, but cannot have this solved.
Is it only a matter of nix-channel --update home-manager? Maybe there is a cache somewhere that needs to be flushed?
I guess it's a matter of updating the version on nixpkg right?
https://github.com/NixOS/nixpkgs-channels/blob/nixos-unstable/pkgs/tools/package-management/home-manager/default.nix#L14
@real34 Depends. If your home-manager channel is on your user, then $ nix-channel --update home-manager should be all that's needed (you can check by running $ nix-channel --list -- if home-manager shows up, it's a user channel). If the channel is on the root user, then you'll need elevated permissions to update it: $ sudo nix-channel --update home-manager.
@happysalada If you're running nixos-unstable, I would recommend using home-manager's master branch as a channel (or through some other method). As you can see by the version (2020-03-17), the home-manager package doesn't get updated often.
@real34 Assuming your dotfiles haven't changed much, I think the problem lies here: https://github.com/real34/dotfiles/blob/23885123e0699d9b13f4771c2b55d777df899e44/home.nix#L136-L139. You're using home-manager from 19.09, which still has loaOf (even 20.03 does).
Feel free to correct me if it's changed and you just haven't pushed anything, but that's what would make the most sense to me.
Sorry for the noob question here.
My channel is set to master
home-manager https://github.com/rycee/home-manager/archive/master.tar.gz from the output of channel list.
However since I am using nix darwin, I think the version of home manager that is being used is the one on stable. I tried using nixUnstable for the channel used for nix-darwin. I don't know how to set up a specific channel for a package. I couldn't find documentation on that.
To install nur, I have had to do something like that
nixpkgs.config = {
allowUnfree = true;
packageOverrides = pkgs: {
nur = import (builtins.fetchTarball {
url = "https://github.com/nix-community/NUR/archive/master.tar.gz";
sha256 = "1c3rh7x8bql2m9xcn3kvdqng75lzzf6kpxb3m6knffyir0jcrfrh";
}) {
inherit pkgs;
};
};
};
Perhaps it's something similar?
When will you add a release-20.09 branch?
I've been hitting something similar (?) as well in the past couple of days:
builder for '/nix/store/4wa1ljsj6s2fi5fmiclr5z5vsykr7ma5-manual-combined.drv' failed with exit code 3; last 10 log lines:
/nix/store/8h7hm3jqhkkmv0wg48w32hv01chbp3ic-manual-combined/manual-combined.xml:11861: element link: validity error : IDREF attribute linkend references an unknown ID "opt-home.file._name__.source"
11857 <name>
11858 </literal></para><para><emphasis>Declared by:</emphasis></para><simplelist><member><filename xlink:href="https://github.com/rycee/home-manager/blob/master/modules/misc/xdg.nix#blob-path">
11859 <home-manager/modules/misc/xdg.nix>
11860 </filename></member></simplelist></listitem></varlistentry><varlistentry><term xlink:href="#opt-xdg.dataFile._name_.text" xml:id="opt-xdg.dataFile._name_.text"><option>xdg.dataFile.<name>.text</option></term><listitem><para>Text of the file. If this option is null then
11861 <link linkend="opt-home.file._name__.source">home.file.<name?>.source</link>
11862 must be set.
11863 </para><para><emphasis>Type:</emphasis> null or strings concatenated with "\n"</para><para><emphasis>Default:</emphasis> <literal>
/nix/store/8h7hm3jqhkkmv0wg48w32hv01chbp3ic-manual-combined/manual-combined.xml fails to validate
@davidak Considering the 20.09 beta hasn't officially begun yet, I feel like creating that branch would be slightly premature. However, consider opening another issue asking this same question (just so we don't derail this one)?
@happysalada Unfortunately, I'm totally unfamiliar with the darwin story for h-m and nixpkgs...
@jpotier Yep, that's the issue that was fixed (or should have been; you guys are making me doubt myself now...) by https://github.com/nix-community/home-manager/pull/1473.
Could anybody still having problems after updating their home-manager channel try one of the following things:
nix-shell '<home-manager>' -A install (this should only create a new generation)programs.home-manager.path = "..."; (and then home-manager switching)and report back with what did or didn't work?
using the nix-shell command you suggested, everything worked fine.
I'm going to research on nix darwin and report if I find a solution.
It looks like a PR has already been merged on nixpkgs
https://github.com/NixOS/nixpkgs/pull/97448
It's a matter of a couple of days before, nixpkgs unstable gets updated I think.
I run home-manager as part of my system configuration, ie:
{ config, pkgs, ... }:
{
imports = [
<home-manager/nixos>
];
home-manager.users.jpotier = {
home = {
packages = with pkgs; [
wget
];
};
}
I'm currently at commit 249650a07e of home-manager (https://github.com/nix-community/home-manager) from master branch.
Running install… Well, broke my user environment (because I don't have a home.nix in a well known place, maybe?) I had to restart my home-manager-jpotier.service to get my user environment back.
Full system nixos-rebuild test still chokes on the same problem after that.
I don't have the change that @happysalada mentionned in my local nixpkgs, so let's see in a few days if that fixes anything.
For those that still have issues, please run
$ nix run nixpkgs.nix-info --command nix-info ; nix eval '(<home-manager>)'
hopefully you'll find an old Home Manager package there.
digging a little further, it looks like one of the checks on the nixpkgs PR hasn't completed, the ofBorg one.
It looks like ofBorg has a lot of darwin builds waiting
https://monitoring.nix.ci/d/000000002/ofborg?orgId=1&refresh=10s
I opened an issue for it
https://github.com/NixOS/ofborg/issues/529
(if nixpkgs is waiting for all the checks to complete before releasing on unstable branch, then this would need to get resolved before it gets deployed)
@rycee Here the output I get running your command
error: --- UsageError -------------------------------------------------------------------------------------------------------------------------------------- nix
unrecognised flag '--command'
Try 'nix --help' for more information.
error: --- Error ------------------------------------------------------------------------------------------------------------------------------------------- nix
experimental Nix feature 'nix-command' is disabled; use '--experimental-features nix-command' to override
I've tried adding --experimental-features nix-command at the end, but then I still get the first error and then I get this one
error: --- BadURL ------------------------------------------------------------------------------------------------------------------------------------------ nix
'(<home-manager>)' is not a valid URL
The first command should be nix shell nixpkgs#nix-info --command nix-info (this changed recently-ish), and the second command should be nix eval --expr '<nixpkgs>' (parentheses optional) -- might need to add --impure before --expr if Nix complains.
Thanks for taking the time to help!
running the first command I get
error: --- Error ------------------------------------------------------------------------------------------------------------------------------------------- nix
experimental Nix feature 'nix-command' is disabled; use '--experimental-features nix-command' to override
trying to fix it with
nix shell --experimental-features nix-command nixpkgs#nix-info --command nix-info
I get then
error: --- Error ------------------------------------------------------------------------------------------------------------------------------------------- nix
experimental Nix feature 'flakes' is disabled; use '--experimental-features flakes' to override
I can't fix this one despite adding the experimental-features flag.
Let's try without requiring nixUnstable:
$ nix-shell -p nix-info --run "nix-info"
$ nix-instantiate --eval --expr '<home-manager>'
(Note: I made a typo in my above message -- should have been <home-manager>, not <nixpkgs>)
Thanks for the help. Both command work. This is the output I get
system: "x86_64-darwin", multi-user?: no, version: nix-env (Nix) 3.0pre20200829_f156513, channels(raphael): "darwin, home-manager, nixpkgs-20.09pre242495.3c0e3697520, nixpkgs-unstable-20.09pre242495.3c0e3697520", nixpkgs: /Users/raphael/.nix-defexpr/channels/nixpkgs
and
/Users/raphael/.nix-defexpr/channels/home-manager
@happysalada And does
$ grep -R loaOf /Users/raphael/.nix-defexpr/channels/home-manager/
print anything? Also
$ grep 'for path' $(which home-manager)
my home-manager is coming from nix-darwin. so that is the path that I get when I run which home-manager
/run/current-system/sw/bin/home-manager
indeed running your second grep gives me
for path in "/nix/store/piwpn4w7x1l5mgw5qf0gjmhvr0lzrxia-source"
I definitely thing that the home manager version is old, since nix-darwin is set to use the nixpkgs-unstable channel, no doubt about that. I'll try again in a few days when the channel has been updated
Thanks again for all the help!
I'll close this meanwhile.
I'm having trouble getting this to work on the bqv-flakes branch. I've tried updating the nixpkgs input and rebasing on master to incorporate the latest changes, but still the same error.
Just FYI, flakes are now on master. bqv-flakes is unnecessary.
For me, running home-manager as a NixOS module, I had to run sudo nix-channel --update home-manager. The channel seems to be on _both_ root and my normal user. Running the channel update as my normal user went through, but did not solve the problem.
@austinbutler can you check that you have the unstable channel in your packages?
I can confirm that on sunday updating the channel and with the unstable version of nixpkgs it all works.
(even though for some weird reason, searh.nixos.org still displays the old version https://search.nixos.org/packages?query=home%20manager&from=0&size=30&sort=relevance&channel=unstable)
@happysalada sorry if I was not clear, sudo nix-channel --update home-manager solved the problem for me.
Problem solved, after I forcefully flushed my outdated /var/src/home-manager clone. For some reason, it didn't update properly, but that's on me :)
@rycee Guess the error I got is similar to the op's and I worked around it setting manual.manpages.enable = false; in home.nix
$ nix-store --read-log /nix/store/yg3p4f65l854j8kbhq52m6jq817jw786-manual-combined.drv
/nix/store/ypag5j9a8gf1flv0za65jga2v28xzk8f-manual-combined/manual-combined.xml:11713: element xref: validity error : I>
11709This release has the following notable changes:
11710
11711
11712
11713 Theoption now allows source files to be
11714 hidden, that is, having a name starting with the. character. It
11715 also allows the source file name to contain characters not typically/nix/store/ypag5j9a8gf1flv0za65jga2v28xzk8f-manual-combined/manual-combined.xml fails to validate
I used nix-shell -E "with import <nixpkgs> {}; mkShell { buildInputs = [ (callPackage ~/.config/nixpkgs/home-sources.nix {}).home-manager ]; }" --run "home-manager -f ~/.config/nixpkgs/home.nix switch" for switch
Info:
$ nix-channel --list
nixpkgs https://nixos.org/channels/nixpkgs-unstable
$ nix run nixpkgs.nix-info --command nix-info ; nix eval '(
)'
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixpkgs' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixpkgs' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
system: "x86_64-linux", multi-user?: no, version: nix-env (Nix) 2.3.7, channels(me): "nixpkgs-21.03pre243353.6d4b93323e7", warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixpkgs' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
nixpkgs: /home/me/.nix-defexpr/channels/nixpkgs
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
error: file 'home-manager' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:2
error: file 'home-manager' was not found in the Nix search path (add it using $NIX_PATH or -I), at (string):1:2
This is how I install home-manager: https://github.com/sgraf812/.nixpkgs/blob/92003c2ae396ae6d67c9a360e9fcd7980a715670/home/user-common.nix#L125
I was hoping that I could just bump the version in my release file to update both NixOS and home-manager. That worked for the last two releases, I believe, but not for the latest one. Probably because the old home-manager (which uses loaOf) tries to build the manual-combined from the new nixpkgs or whatever. The solution might be to first bump the release, then home-manager switch, then nix-channel --update my nixpkgs branch. But I remember from past upgrades that that had similar bootstrapping issues, so that's not an option.
The solution to the bootstrapping problem in my case was to follow https://github.com/nix-community/home-manager/issues/1479#issuecomment-689729374 and install the newest version of home-manager (after having done nix-channel --update) via
$ nix-shell https://github.com/nix-community/home-manager/archive/release-20.09.tar.gz -A install
This will create the new generation with an updated home-manager, and that works.
Today I installed a new system and I am facing this very specific issue.
I have the following channels enabled, for the system:
otavio ~ % sudo nix-channel --list
home-manager https://github.com/nix-community/home-manager/archive/release-20.09.tar.gz
nixos https://nixos.org/channels/nixos-20.09
Then I have added it to environment.systemPackages so I can use it on the home directory to inspect the news and do local home-manager switch as well. When triggering it, it fails:
otavio ~ % home-manager switch
these derivations will be built:
/nix/store/2ms4h8fmzaqfap5g059mnkabhw25d0nm-manual-combined.drv
/nix/store/6f69sdhn32v0v4cqhd0bw5fgpx2s39n8-manual-olinkdb.drv
/nix/store/cb7ghfjr8xp1g5293rrxcv8ccjhqxid1-man-pages.drv
/nix/store/qsdqhrfp4ndw4lnfxcsl6z8fg1fc9lfy-home-manager-path.drv
/nix/store/8m87r07kijfrzn5a02adhi9mhpwsr4c3-activation-script.drv
/nix/store/zakkjvvdhzqfx73lsmnw3i375cymm8qz-home-manager-generation.drv
building '/nix/store/2ms4h8fmzaqfap5g059mnkabhw25d0nm-manual-combined.drv'...
/nix/store/8a4av253s8bl6rmzz3lv5gbwwz1rpfpj-manual-combined/manual-combined.xml:11069: element xref: validity error : IDREF attribute linkend references an unknown ID "opt-home.file._name__.source"
11065 <simpara>This release has the following notable changes:</simpara>
11066 <itemizedlist>
11067 <listitem>
11068 <simpara>
11069 The <xref linkend="opt-home.file._name__.source"/> option now allows source files to be
11070 hidden, that is, having a name starting with the <literal>.</literal> character. It
11071 also allows the source file name to contain characters not typically
/nix/store/8a4av253s8bl6rmzz3lv5gbwwz1rpfpj-manual-combined/manual-combined.xml fails to validate
builder for '/nix/store/2ms4h8fmzaqfap5g059mnkabhw25d0nm-manual-combined.drv' failed with exit code 3
cannot build derivation '/nix/store/cb7ghfjr8xp1g5293rrxcv8ccjhqxid1-man-pages.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/qsdqhrfp4ndw4lnfxcsl6z8fg1fc9lfy-home-manager-path.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/zakkjvvdhzqfx73lsmnw3i375cymm8qz-home-manager-generation.drv': 1 dependencies couldn't be built
error: build of '/nix/store/zakkjvvdhzqfx73lsmnw3i375cymm8qz-home-manager-generation.drv' failed
There are 106 unread and relevant news items.
Read them by running the command 'home-manager news'.
There is something wrong. I tried the suggestions from previous comments but it did not help. Any idea how to find out the culprit?
Until recently, the home-manager in Nixpkgs was the 20.03 version (meaning you had a 20.03 home-manager on 20.09). I recent PR'd an update (https://github.com/NixOS/nixpkgs/pull/102549), so the next time nixos-20.09 bumps, you'll be able to use the updated package.
This continues to be an issue for me. Like otavio, I've tried a bunch of different fixes listed in here, and nothing's working; even after re-adding a new nix-channel, updating that, and reinstalling home-manager, I can't update. Has anybody considered checking manual-combined.xml for typos?
Most helpful comment
If you're using home-manager from master, you probably need to update your home-manager channel. The commit I made actually fixed this issue.