NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.28k stars 13.53k forks source link

nixos module for dunst #47398

Open xaverdh opened 5 years ago

xaverdh commented 5 years ago

Issue description

The dunst notification daemon currently doesn't have a nixos module. This prevents users from setting system wide dunst configuration declaratively in their nix config.

My own custom module (https://gitlab.com/xaverdh/my-nixos-config/blob/master/dunst.nix) might serve as a starting point (feel free to copy things from there). Its probably overkill, and unmaintainable in the current state though, since it served as an experiment with the module system for me.

The minimal implementation would be, to add an option to inject custom configuration into dunsts command line or a system wide config file.

cc @domenkozar

teto commented 5 years ago

You might want to have a look at home-manager https://github.com/rycee/home-manager/blob/master/modules/services/dunst.nix

xaverdh commented 5 years ago

I am aware of home-manager. I guess there is the more general question of whether one considers notification daemons to be part of the "global" system spec or a per user thing. The display and desktop managers available on the system are usually considered system wide things, and I imagined notification daemons as belonging somewhere close to these.

But I agree, that this is debatable.

rnhmjoj commented 5 years ago

wow, yes, It's probably overkill: I don't think you need to map settings to nix options 1:1. Anyway, It could be implemented as a user service instead, similarly to redshift, compton etc.

bakhtiyarneyman commented 4 years ago

Doesn't seem like an overkill to me. I would gladly use it. The fact that NixOS can provide a universal interface to anything is something I really value.

rnhmjoj commented 4 years ago

Sure, but that has some drawbacks: like mainting all that options in track with upstream could be time consuming. The alternative is providing a .settings options that basically turns an arbitrary set of options into a configuration file (think .ini or some other simple format). This is the proposal https://github.com/NixOS/rfcs/pull/42. Also, since it's not linked here already: there is an open PR by @xaverdh, #58209

stale[bot] commented 4 years ago

Thank you for your contributions. This has been automatically marked as stale because it has had no activity for 180 days. If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity. Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on irc.freenode.net.
NorfairKing commented 2 years ago

I would potentially be interested in this because my notification server broke in 21.05

rnhmjoj commented 2 years ago

The most up-to-date work is https://github.com/NixOS/nixpkgs/pull/112100. The module basically works, but there are two issues:

  1. dbus autospawning (an incorrectly configured) dunst if not running
  2. configuration not being reload after a rebuild
stale[bot] commented 2 years ago

I marked this as stale due to inactivity. → More info

NorfairKing commented 2 years ago

I marked this not stale due to activity from the stale bot.