Skip to content

nixos/hyprland: programs.hyprland.enable = true no longer builds #401209

@TRPB

Description

@TRPB

Nixpkgs version

  • Stable (24.11)

Most likely cause: https://github.com/NixOS/nixpkgs/pull/400957/files

Describe the bug

My config hasn't changed but after a nix flake update on the 24.11 branch if I have programs.hyprland.enable = true in my config I get the following error

     … while calling the 'head' builtin
         at /nix/store/52hnnvpyni1n79ra4rqxdcswmd2w3823-source/lib/attrsets.nix:1534:13:
         1533|           if length values == 1 || pred here (elemAt values 1) (head values) then
         1534|             head values
             |             ^
         1535|           else

       … while evaluating the attribute 'value'
         at /nix/store/52hnnvpyni1n79ra4rqxdcswmd2w3823-source/lib/modules.nix:992:7:
          991|     // {
          992|       value = addErrorContext "while evaluating the option `${showOption loc}':" value;
             |       ^
          993|       inherit (res.defsFinal') highestPrio;

       … while evaluating the option `system.build.toplevel':

       … while evaluating definitions from `/nix/store/52hnnvpyni1n79ra4rqxdcswmd2w3823-source/nixos/modules/system/activation/top-level.nix':

       … while evaluating the option `assertions':

       … while evaluating definitions from `/nix/store/52hnnvpyni1n79ra4rqxdcswmd2w3823-source/nixos/modules/system/boot/systemd.nix':

       … while evaluating the option `systemd.services':

       … while evaluating definitions from `/nix/store/52hnnvpyni1n79ra4rqxdcswmd2w3823-source/nixos/modules/services/logging/logrotate.nix':

       … while evaluating the option `services.logrotate.enable':

       … while evaluating the option `users.groups':

       … while evaluating definitions from `/nix/store/52hnnvpyni1n79ra4rqxdcswmd2w3823-source/nixos/modules/config/resolvconf.nix':

       … while evaluating the option `networking.resolvconf.enable':

       … while evaluating the option `environment.etc':

       … while evaluating definitions from `/nix/store/52hnnvpyni1n79ra4rqxdcswmd2w3823-source/nixos/modules/config/xdg/portal.nix':

       … while evaluating the option `xdg.portal.enable':

       … while evaluating definitions from `/nix/store/52hnnvpyni1n79ra4rqxdcswmd2w3823-source/nixos/modules/config/xdg/portals/wlr.nix':

       … while evaluating the option `xdg.portal.wlr.enable':

       … while evaluating definitions from `/nix/store/52hnnvpyni1n79ra4rqxdcswmd2w3823-source/nixos/modules/programs/wayland/hyprland.nix':


It appears to be an issue with WLR portals.

I have tried with and without the following conifg:

  xdg.portal = {
    enable = true;
    extraPortals = [
      pkgs.xdg-desktop-portal-gtk
      pkgs.xdg-desktop-portal-hyprland
    ];
  };

Steps to reproduce

set programs.hyprland.enable = true

I removed all other hyprland based config

Expected behaviour

the system builds

Screenshots

No response

Relevant log output

Additional context

No response

System metadata

  • system: "x86_64-linux"
  • host os: Linux 6.6.76, NixOS, 24.11 (Vicuna), 24.11.20250212.0ff09db
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.24.12
  • nixpkgs: /nix/store/9xr4v5kw14aqjg77nqfdspfm2fs2m786-source

Notify maintainers

@fufexan


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken6.topic: nixosIssues or PRs affecting NixOS modules, or package usability issues specific to NixOS

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions