Skip to content

Failed assertions when module explicitly turned off #64

Description

@Pandapip1
       error:
       Failed assertions:
       - gavin profile: cosmic-manager(time): COSMIC Desktop declarative configuration must be enabled to use Date, Time & Calendar applet module.
       - gavin profile: cosmic-manager(audio): COSMIC Desktop declarative configuration must be enabled to use Sound applet module.
       - gavin profile: cosmic-manager(app-list): COSMIC Desktop declarative configuration must be enabled to use App Tray applet module.

However, the pattern I tend to use is that I unconditionally set the options I want globally for all of my devices, and then selectively enable the actual things I want enabled and/or condition them on existing options. For example, my global COSMIC-manager config is

{
  lib,
  config,
  ...
}:

{
  home-manager.sharedModules = [
    (
      {
        cosmicLib,
        ...
      }:
      let
        inherit (cosmicLib.cosmic) mkRON;
        # ...
      in
      {
        wayland.desktopManager.cosmic = {
          enable = config.services.desktopManager.cosmic.enable;
          # ...
        };
      }
    )
  ];
}

Can these asserts be removed to bring cosmic-manager in line with how modules normally work? AFAIK there is no precedent for how cosmic-manager currently does this.

I do realize I can mkIf the entire thing, but I dislike that since it breaks the pattern I use literally everywhere else.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions