I am getting `error: attribute 'intune' missing` when updating a flake

I am using the howdy flake from this PR, but when trying to update the flake I am getting error: attribute 'intune' missing. I haven’t been able to figure out what intune is or what I could do to debug this… Does anyone here have any ideas?

❯ sudo nix flake update && sudo nixos-rebuild --flake .#TuxedoInfinityBook14Gen8 switch --option eval-cache false
building the system configuration...
       … while calling the 'head' builtin

         at /nix/store/kvdq6h9sw9aj2s19hrzfscky2i8w2qnv-source/lib/attrsets.nix:922:11:

          921|         || pred here (elemAt values 1) (head values) then
          922|           head values
             |           ^
          923|         else

       … while evaluating the attribute 'value'

         at /nix/store/kvdq6h9sw9aj2s19hrzfscky2i8w2qnv-source/lib/modules.nix:807:9:

          806|     in warnDeprecation opt //
          807|       { value = builtins.addErrorContext "while evaluating the option `${showOption loc}':" value;
             |         ^
          808|         inherit (res.defsFinal') highestPrio;

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: attribute 'intune' missing

       at /nix/store/46qk653gj878vbxq6mvs3xfgghbxc8ki-source/nixos/modules/security/pam.nix:702:18:

          701|               || cfg.enableGnomeKeyring
          702|               || config.services.intune.enable
             |                  ^
          703|               || cfg.googleAuthenticator.enable

I guess you are mixing nixpkgs channels somehow. Intune was recently added to unstable, it is not available in 23.11 for example.

Hmm, yes. I have both the stable and unstable channel enabled though I only use unstable for a few things. I think the problem is that the howdy PR (which I am using in an overlay) builds on unstable, so it refers to intune which my system isn’t aware of…

Do you happen to have any ideas on how to work around this?

That PR does not use intune. How are you applying it?

I’ve got the config here: https://github.com/SimonBrandner/dotfiles/blob/620c94c03c0943ec764eaec6f204d0ccd0535ef8/Root/etc/nixos/TuxedoInfinityBook14Gen8.nix

Is there a better way to do it?

Right this is the offending line:

You generally cannot expect importing random Nixpkgs modules to work since they can have other dependencies. This is doubly true for highly integrated modules like pam.

Your options are:

  • Switching to unstable.
  • Creating a git branch with the contents of the PR rebased onto your Nixpkgs revision, and using that.
  • Adding intune module (and whatever else that expects). Maybe adding { options.services.intune.enable = lib.mkEnableOption "dummy so that we can use pam module from unstable"; } to imports will be sufficient for now.
  • Waiting until intune is merged.
1 Like

I ended up using the hack you suggested (see 2024-03-16T20:03:09+01:00 · SimonBrandner/dotfiles@36c71b1 · GitHub) and it works great! Thank you!