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 = {
|
|
|
|
enable = mkEnableOption "Volnoti volume HUD daemon";
|
|
|
|
|
|
|
|
package = mkOption {
|
|
|
|
type = types.package;
|
|
|
|
default = pkgs.volnoti;
|
|
|
|
defaultText = literalExample "pkgs.volnoti";
|
|
|
|
description = ''
|
|
|
|
Package containing the <command>volnoti</command> program.
|
|
|
|
'';
|
|
|
|
};
|
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"; };
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|