Skip to content

regreet: allow silencing warning caused by using custom session command#2366

Open
abkein wants to merge 1 commit into
nix-community:masterfrom
abkein:disable-regreet-warning
Open

regreet: allow silencing warning caused by using custom session command#2366
abkein wants to merge 1 commit into
nix-community:masterfrom
abkein:disable-regreet-warning

Conversation

@abkein

@abkein abkein commented Jun 13, 2026

Copy link
Copy Markdown

The warning is very annoying


@stylix-automation stylix-automation Bot added topic: nixos NixOS target topic: modules /modules/ subsystem labels Jun 13, 2026
@0xda157 0xda157 changed the title regreet: allow disabling warning about using cutsom greetd command regreet: allow silencing warning caused by using custom session command Jun 17, 2026

@0xda157 0xda157 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for your contributing, i've left some notes inline

Comment thread modules/regreet/nixos.nix
lib.optional
(
cfg.enable
&& (!cfg.disableCustomGreetdWarning)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the checks are failing because in this scope cfg is referencing the nixos modules's options, not the stylix module's. you'll need to modify this config segment to take { cfg } as an argument and rename the existing cfg. something like this:

config = [
  (
    { cfg }:
    {
      warnings =
        let
          hmCfg = config.programs.regreet;
        in
        # ...

Comment thread modules/regreet/nixos.nix
Comment on lines +41 to +43
disableCustomGreetdWarning = lib.mkOption {
description = ''
Disable warning produced by this module when using custom `services.greetd.settings.default_session.command`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe an option name that's a little more clear, something like this:

Suggested change
disableCustomGreetdWarning = lib.mkOption {
description = ''
Disable warning produced by this module when using custom `services.greetd.settings.default_session.command`.
silenceCustomSessionCommandWarning = lib.mkOption {
description = ''
Silences the warning produced by this module when using custom `services.greetd.settings.default_session.command`.

Comment thread modules/regreet/nixos.nix
'';
type = lib.types.bool;
default = false;
example = "true";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
example = "true";
example = true;

Comment thread modules/regreet/nixos.nix
)
)
"stylix: regreet: custom services.greetd.settings.default_session.command value may not work: ${config.services.greetd.settings.default_session.command}";
"stylix: regreet: custom `services.greetd.settings.default_session.command` value may not work: ${config.services.greetd.settings.default_session.command}";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you also mention the option to silence the warning in the warning itself please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic: modules /modules/ subsystem topic: nixos NixOS target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants