Error during system updat
sudo nix-channel --update ; sudo nixos-rebuild switch
error: attribute 'flavors' missing, at /root/.nix-defexpr/channels/home-manager/modules/services/gpg-agent.nix:134:41
(use '--show-trace' to show detailed location information)
Full --show-trace
sudo nix-channel --update ; sudo nixos-rebuild switch --show-trace 53.4s
unpacking channels...
building Nix...
building the system configuration...
error: while evaluating the attribute 'activationScript' of the derivation 'nixos-system-lenovo-nixos-19.09.1693.eab4ee0c27c' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/top-level.nix:102:5:
while evaluating the attribute 'system.activationScripts.script' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:68:9:
while evaluating 'textClosureMap' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/strings-with-deps.nix:70:35, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:89:18:
while evaluating 'id' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/trivial.nix:14:5, called from undefined position:
while evaluating the attribute 'text' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/activation/activation-script.nix:9:5:
while evaluating the attribute 'text' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/strings-with-deps.nix:77:38:
while evaluating the attribute 'sources' of the derivation 'etc' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/etc/etc.nix:12:5:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/etc/etc.nix:20:20, called from undefined position:
while evaluating the attribute 'source' at undefined position:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:75:45, called from undefined position:
while evaluating the attribute 'value' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:336:9:
while evaluating the option `environment.etc.systemd/system.source':
while evaluating the attribute 'mergedValue' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:368:5:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:368:32, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:368:19:
while evaluating 'check' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/types.nix:246:15, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:369:10:
while evaluating the attribute 'buildCommand' of the derivation 'system-units' at /nix/store/jvlsdn7i2pin238n33n1ynsky0pmk13n-nixos-19.09.1693.eab4ee0c27c/nixos/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute 'text' of the derivation 'unit-home-manager-mudrii.service' at /nix/store/jvlsdn7i2pin238n33n1ynsky0pmk13n-nixos-19.09.1693.eab4ee0c27c/nixos/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute 'text' at undefined position:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:75:45, called from undefined position:
while evaluating the attribute 'value' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:336:9:
while evaluating the option `systemd.units.home-manager-mudrii.service.text':
while evaluating the attribute 'isDefined' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:373:5:
while evaluating the attribute 'values' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:362:9:
while evaluating the attribute 'values' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:456:7:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:348:28, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:348:17:
while evaluating 'dischargeProperties' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:415:25, called from /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:349:62:
while evaluating the attribute 'value' at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:234:44:
while evaluating 'attrsToSection' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/boot/systemd-lib.nix:104:20, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/boot/systemd.nix:342:13:
while evaluating anonymous function at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/boot/systemd-lib.nix:106:12, called from undefined position:
while evaluating 'toOption' at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/boot/systemd-lib.nix:99:14, called from /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/system/boot/systemd-lib.nix:107:21:
while evaluating the attribute 'text' of the derivation 'activate-mudrii' at /nix/store/jvlsdn7i2pin238n33n1ynsky0pmk13n-nixos-19.09.1693.eab4ee0c27c/nixos/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute 'buildCommand' of the derivation 'home-manager-generation' at /nix/store/jvlsdn7i2pin238n33n1ynsky0pmk13n-nixos-19.09.1693.eab4ee0c27c/nixos/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute 'text' of the derivation 'activation-script' at /nix/store/jvlsdn7i2pin238n33n1ynsky0pmk13n-nixos-19.09.1693.eab4ee0c27c/nixos/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating 'mkCmd' at /root/.nix-defexpr/channels/home-manager/modules/home-environment.nix:363:17, called from undefined position:
while evaluating the attribute 'data' at /root/.nix-defexpr/channels/home-manager/modules/lib/dag.nix:96:41:
while evaluating the attribute 'data' at /root/.nix-defexpr/channels/home-manager/modules/lib/dag.nix:89:11:
while evaluating the attribute 'data' at /root/.nix-defexpr/channels/home-manager/modules/lib/dag.nix:115:12:
while evaluating the attribute 'passAsFile' of the derivation 'home-manager-path' at /nix/store/jvlsdn7i2pin238n33n1ynsky0pmk13n-nixos-19.09.1693.eab4ee0c27c/nixos/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute 'buildCommand' of the derivation 'man-pages' at /nix/store/jvlsdn7i2pin238n33n1ynsky0pmk13n-nixos-19.09.1693.eab4ee0c27c/nixos/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute 'buildCommand' of the derivation 'manual-olinkdb' at /nix/store/jvlsdn7i2pin238n33n1ynsky0pmk13n-nixos-19.09.1693.eab4ee0c27c/nixos/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute 'buildCommand' of the derivation 'manual-combined' at /nix/store/jvlsdn7i2pin238n33n1ynsky0pmk13n-nixos-19.09.1693.eab4ee0c27c/nixos/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute 'passAsFile' of the derivation 'nmd-documents' at /nix/store/jvlsdn7i2pin238n33n1ynsky0pmk13n-nixos-19.09.1693.eab4ee0c27c/nixos/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute 'buildCommand' of the derivation 'options-db.xml' at /nix/store/jvlsdn7i2pin238n33n1ynsky0pmk13n-nixos-19.09.1693.eab4ee0c27c/nixos/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating the attribute 'text' of the derivation 'nmd-options.xml' at /nix/store/jvlsdn7i2pin238n33n1ynsky0pmk13n-nixos-19.09.1693.eab4ee0c27c/nixos/pkgs/build-support/trivial-builders.nix:7:14:
while evaluating 'substFunction' at /nix/store/wdg2yd6ilas51lpz115an3ylc7walnis-nmd/lib/modules-doc.nix:86:19, called from /nix/store/wdg2yd6ilas51lpz115an3ylc7walnis-nmd/lib/modules-doc.nix:62:48:
while evaluating the attribute 'type' at /nix/store/jvlsdn7i2pin238n33n1ynsky0pmk13n-nixos-19.09.1693.eab4ee0c27c/nixos/lib/options.nix:151:11:
while evaluating the attribute 'type.description' at /nix/store/jvlsdn7i2pin238n33n1ynsky0pmk13n-nixos-19.09.1693.eab4ee0c27c/nixos/lib/types.nix:92:7:
while evaluating the attribute 'description' at /nix/store/jvlsdn7i2pin238n33n1ynsky0pmk13n-nixos-19.09.1693.eab4ee0c27c/nixos/lib/types.nix:92:7:
while evaluating 'concatMapStringsSep' at /nix/store/jvlsdn7i2pin238n33n1ynsky0pmk13n-nixos-19.09.1693.eab4ee0c27c/nixos/lib/strings.nix:88:5, called from /nix/store/jvlsdn7i2pin238n33n1ynsky0pmk13n-nixos-19.09.1693.eab4ee0c27c/nixos/lib/types.nix:417:33:
while evaluating the attribute 'pinentry.flavors' at undefined position:
attribute 'flavors' missing, at /root/.nix-defexpr/channels/home-manager/modules/services/gpg-agent.nix:134:41
The issue seems is related to https://github.com/rycee/home-manager/commit/ebf1df58da055a0f68bc1fcc14b283791b1d191b
You are using the master branch of Home Manager with a stable branch of NixOS/Nixpkgs. You need to switch to the corresponding stable branch of Home Manager, currently release-19.09.
Yes, correct Thx @rycee switching from master to https://github.com/rycee/home-manager/archive/release-19.09.tar.gz fixed the issue Thx for the pointing to correct fix.
I ran into this recently, might be nice to provide a warning for users.
This happened to me when upgrading from 19.09 to 20.03. And it was due to me naming my default channel nixos (pointing to nixos-20.03) instead of nixpkgs (at least I believe so, nuked my complete Nix installation to see this), which meant that it picked up an old nixpkgs channel that wouldn't appear in nix-channel --list, lying around somewhere.
Note also that it was never a problem before, or at least not since the last home-manager release.
Most helpful comment
You are using the master branch of Home Manager with a stable branch of NixOS/Nixpkgs. You need to switch to the corresponding stable branch of Home Manager, currently release-19.09.