2021-07-21 06:17:27 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
cfg = config.services.volnoti;
|
|
|
|
|
|
|
|
in {
|
|
|
|
meta.maintainers = [ maintainers.imalison ];
|
|
|
|
|
|
|
|
options = {
|
2021-07-28 21:39:29 +02:00
|
|
|
services.volnoti = {
|
2023-07-01 01:30:13 +02:00
|
|
|
enable = mkEnableOption (lib.mdDoc "Volnoti volume HUD daemon");
|
2021-07-28 21:39:29 +02:00
|
|
|
|
|
|
|
package = mkOption {
|
|
|
|
type = types.package;
|
|
|
|
default = pkgs.volnoti;
|
2021-10-09 11:14:08 +02:00
|
|
|
defaultText = literalExpression "pkgs.volnoti";
|
2023-07-01 01:30:13 +02:00
|
|
|
description = lib.mdDoc ''
|
|
|
|
Package containing the {command}`volnoti` program.
|
2021-07-28 21:39:29 +02:00
|
|
|
'';
|
|
|
|
};
|
2021-07-21 06:17:27 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
2021-07-24 00:37:06 +02:00
|
|
|
assertions = [
|
|
|
|
(lib.hm.assertions.assertPlatform "services.volnoti" pkgs
|
|
|
|
lib.platforms.linux)
|
|
|
|
];
|
|
|
|
|
2021-07-21 06:17:27 +02:00
|
|
|
home.packages = [ cfg.package ];
|
2021-07-24 00:37:06 +02:00
|
|
|
|
2021-07-21 06:17:27 +02:00
|
|
|
systemd.user.services.volnoti = {
|
|
|
|
Unit = { Description = "volnoti"; };
|
|
|
|
|
|
|
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
|
|
|
|
|
|
|
Service = { ExecStart = "${pkgs.volnoti}/bin/volnoti -v -n"; };
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|