hyprsunset: assert hyprland package is not null (#7518)

This commit is contained in:
Aguirre Matteo
2025-07-23 14:54:04 +00:00
committed by GitHub
parent 0cdfcdbb52
commit 62975b8e23

View File

@@ -72,7 +72,18 @@ in
};
config = lib.mkIf cfg.enable {
systemd.user =
assertions = [
{
assertion = (config.wayland.windowManager.hyprland.package != null);
message = ''
Can't set services.hyprsunset.enable if wayland.windowManager.hyprland.package
is set to null. If you are using Hyprland's upstream flake, see:
<https://github.com/nix-community/home-manager/issues/7484>.
'';
}
];
systemd.user = lib.mkIf (config.wayland.windowManager.hyprland.package != null) (
let
# Create the main persistent service that maintains the IPC socket
# Create a service for each transition in the transitions configuration
@@ -139,6 +150,7 @@ in
};
}
) cfg.transitions;
};
}
);
};
}