Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change to sssd.nix causes nixos build scripts to fail with error #91242

Closed
benwbooth opened this issue Jun 21, 2020 · 0 comments · Fixed by #96179
Closed

Change to sssd.nix causes nixos build scripts to fail with error #91242

benwbooth opened this issue Jun 21, 2020 · 0 comments · Fixed by #96179

Comments

@benwbooth
Copy link
Contributor

benwbooth commented Jun 21, 2020

Describe the bug
A clear and concise description of what the bug is.

I created a Dockerfile for building a custom nixos Docker image out of the nixos/nix Docker image on Docker hub. A few weeks ago it was building fine using nixos/nix:2.3.4. But I noticed that with the latest nixos/nix:latest, I was getting the following error message when building nixos:

#10 1.430 error: while evaluating the attribute 'config.system.build.toplevel' at /root/.nix-defexpr/channels/nixpkgs/nixos/modules/system/activation/top-level.nix:280:5:
#10 1.430 while evaluating 'foldr' at /root/.nix-defexpr/channels/nixpkgs/lib/lists.nix:52:20, called from /root/.nix-defexpr/channels/nixpkgs/nixos/modules/system/activation/top-level.nix:130:12:
#10 1.430 while evaluating 'fold'' at /root/.nix-defexpr/channels/nixpkgs/lib/lists.nix:55:15, called from /root/.nix-defexpr/channels/nixpkgs/lib/lists.nix:59:8:
#10 1.430 while evaluating anonymous function at /root/.nix-defexpr/channels/nixpkgs/nixos/modules/system/activation/top-level.nix:123:50, called from undefined position:
#10 1.430 while evaluating the attribute 'assertion' at /root/.nix-defexpr/channels/nixpkgs/nixos/modules/config/nsswitch.nix:101:9:
#10 1.430 while evaluating the attribute 'system.nssModules.path' at /root/.nix-defexpr/channels/nixpkgs/nixos/modules/config/nsswitch.nix:24:11:
#10 1.430 while evaluating 'makeSearchPathOutput' at /root/.nix-defexpr/channels/nixpkgs/lib/strings.nix:142:5, called from /root/.nix-defexpr/channels/nixpkgs/nixos/modules/config/nsswitch.nix:24:18:
#10 1.430 while evaluating 'makeSearchPath' at /root/.nix-defexpr/channels/nixpkgs/lib/strings.nix:122:5, called from /root/.nix-defexpr/channels/nixpkgs/lib/strings.nix:142:11:
#10 1.430 while evaluating the attribute 'mergedValue' at /root/.nix-defexpr/channels/nixpkgs/lib/modules.nix:415:5:
#10 1.430 The option value system.nssModules' in /root/.nix-defexpr/channels/nixpkgs/nixos/modules/services/misc/sssd.nix' is not of type `list of paths'.

#10 ERROR: executor failed running [/bin/sh -c export NIX_PATH=$NIX_PATH:/root/.nix-defexpr/channels:nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels && export NIXOS_CONFIG=/etc/nixos/configuration.nix && nix-env --set -I nixpkgs=$HOME/.nix-defexpr/channels/nixpkgs -f '<nixpkgs/nixos>' -p /nix/var/nix/profiles/system -A system --show-trace]: runc did not terminate sucessfully

Looking at the changes to nixpkgs/nixos/modules/services/misc/sssd.nix, I discovered that changing line 72 from

system.nssModules = pkgs.sssd;

back to

system.nssModules = optional cfg.enable pkgs.sssd;

fixed the problem. It looks like this was changed on May 9 to remove redundant condition:

90bc3ec

But removing the redundant condition causes the assertion in nixpkgs/nixos/modules/config/nsswitch.nix to fail due to the scripts now complaining that system.nssModules is not of type list of paths.

Any chance we can get that line reverted?

Thanks!

To Reproduce
Steps to reproduce the behavior:

  1. ...
  2. ...
  3. ...

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Notify maintainers

Metadata
Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module: sssd nsswitch
@bbigras bbigras self-assigned this Aug 24, 2020
bbigras added a commit to bbigras/nixpkgs that referenced this issue Aug 24, 2020
'system.nssModules' was not set correctly

fix NixOS#91242
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants