home-manager icon indicating copy to clipboard operation
home-manager copied to clipboard

eww: added improvements

Open Eveeifyeve opened this issue 1 year ago • 7 comments

Description

  • Added systemd option to run eww as a service inspired by programs.waybar.systemd
    • Removes the need of this pr: #5136
  • Added string config option for both yuck and scss implements this propperly #5585
    • Made all options require and <yuck, configDir, scss>.enable to work.
    • Made assertions to avoid overriding issues with scss x yuck and config dir.
  • Made yuck, scss & configDir optional. which does this: #4595

closes https://github.com/nix-community/home-manager/pull/5136

Checklist

  • [x] Change is backwards compatible.

  • [x] Code formatted with ./format.

  • [x] Code tested through nix-shell --pure tests -A run.all or nix develop --ignore-environment .#all using Flakes.

  • [x] Test cases updated/added. See example.

  • [x] Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • [x] Added myself as module maintainer. See example.

Maintainer CC

@mainrs

Eveeifyeve avatar Oct 20 '24 10:10 Eveeifyeve

Also @mainrs, please provide an actual email not a GitHub nore-reply because I can't contact you sept for here about this.

Eveeifyeve avatar Oct 20 '24 11:10 Eveeifyeve

@rycee maintainer maybe abandoned hm?

Eveeifyeve avatar Nov 01 '24 08:11 Eveeifyeve

@Eveeifyeve I just had this thought: wouldn't it also be possible to simply check for the existence of the values in yuck, scss and configDir, removing the need for the enable flags? It would de-clutter user configurations. I also haven't found any configuration definition in home-manager that uses the enable pattern for exclusive sets (I have to admit, I did a fast, rudimentary search only).

mainrs avatar Nov 01 '24 12:11 mainrs

Thanks! Looks good in general 🙂

About the

BREAKING CHANGE configDir isprograms.eww.configDir = ./path to programs.eww.configDir.config = ./path .

I would suggest keeping the old option for backwards compatibility, just make it nullable with null as default value. Can add a sentence in the description discouraging use of configDir. Perhaps even add a warning. Something like

warnings = optional (cfg.configDir != null) ''
  The option programs.eww.configDir is deprecated.
  Use programs.eww.yuck or programs.eww.scss instead.'';

perhaps.

rycee avatar Nov 01 '24 21:11 rycee

Thanks! Looks good in general 🙂

About the

BREAKING CHANGE configDir isprograms.eww.configDir = ./path to programs.eww.configDir.config = ./path .

I would suggest keeping the old option for backwards compatibility, just make it nullable with null as default value. Can add a sentence in the description discouraging use of configDir. Perhaps even add a warning. Something like

warnings = optional (cfg.configDir != null) ''
  The option programs.eww.configDir is deprecated.
  Use programs.eww.yuck or programs.eww.scss instead.'';

perhaps.

I mean I am still going to keep config dir because backwards compatibility but the problem is in the future say if someone wants to pull a random eww config off of the internet that uses the (import ./folder/eww.yuck) method is going to become an issue because that user would have to use builtin.readFile for a lot of eww files, I think still having the support for it should stay.

https://github.com/HynDuf/dotfiles/tree/9be198a9ab5307ebd55633fe248607a9956bc074/.config/eww

Eveeifyeve avatar Nov 01 '24 21:11 Eveeifyeve

@rycee & @mainrs Ready to review again!

Eveeifyeve avatar Dec 06 '24 12:12 Eveeifyeve

Oh tests failed.

Eveeifyeve avatar Dec 06 '24 12:12 Eveeifyeve

Thank you for your contribution! I marked this pull request as stale due to inactivity. Please read the relevant sections below before commenting.

If you are the original author of the PR

  • GitHub sometimes doesn't notify people who commented / reviewed a PR previously when you (force) push commits. If you have addressed the reviews you can officially ask for a review from those who commented to you or anyone else.
  • If it is unfinished but you plan to finish it, please mark it as a draft.
  • If you don't expect to work on it any time soon, please consider closing it with a short comment encouraging someone else to pick up your work.
  • To get things rolling again, rebase the PR against the target branch and address valid comments.
If you are not the original author of the PR

  • If you want to pick up the work on this PR, please create a new PR and indicate that it supercedes and closes this PR.

stale[bot] avatar Sep 15 '25 06:09 stale[bot]