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