Skip to content

Do not create a config file from HM if settings is not set #699

Closed
@aster-void

Description

Is your feature request related to a problem? Please describe.
I like to manage my config files myself using stow, rather than letting home manager do it.
the home manager module seems to always generate the config, no matter the configuration.

this is my HM config:

{
  programs.hyprpanel = {
    enable = true;
    overlay.enable = true;
    hyprland.enable = true;
  };
}

Describe the solution you'd like
I'd like the config to be linked only when there's at least one config.

Describe alternatives you've considered
idk, like use HM to config hyprpanel?

Additional context

it may look like this:

home.files.(path).text = lib.mkIf (cfg.settings != {}) ''
  # how it's currently done...
'';

search the home-manager repo for references. for example, tmate, jujutsu, rbenv, lazygit, and awscli do it like this, to name a few.

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