1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-11-08 19:46:05 +01:00
home-manager/modules/services/notify-osd.nix
Austin Horstman 86402a17b6 treewide: flatten single file modules
Some files don't need nesting and can be root level again to reduce
conflicts with other PRs.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-06-23 16:20:26 -05:00

43 lines
827 B
Nix

{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.notify-osd;
in
{
meta.maintainers = [ lib.maintainers.imalison ];
options = {
services.notify-osd = {
enable = lib.mkEnableOption "notify-osd";
package = lib.mkPackageOption pkgs "notify-osd" { };
};
};
config = lib.mkIf cfg.enable {
assertions = [
(lib.hm.assertions.assertPlatform "services.notify-osd" pkgs lib.platforms.linux)
];
systemd.user.services.notify-osd = {
Unit = {
Description = "notify-osd";
After = [ "graphical-session.target" ];
PartOf = [ "graphical-session.target" ];
};
Install.WantedBy = [ "graphical-session.target" ];
Service = {
ExecStart = "${cfg.package}/bin/notify-osd";
Restart = "on-abort";
};
};
};
}