1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-26 19:59:47 +01:00
home-manager/modules/services/volnoti.nix

44 lines
930 B
Nix
Raw Normal View History

2021-07-21 06:17:27 +02:00
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.volnoti;
in {
2024-08-10 23:13:35 +02:00
meta.maintainers = with maintainers; [ imalison tomodachi94 ];
2021-07-21 06:17:27 +02:00
options = {
services.volnoti = {
enable = mkEnableOption "Volnoti volume HUD daemon";
package = mkOption {
type = types.package;
default = pkgs.volnoti;
defaultText = literalExpression "pkgs.volnoti";
description = ''
Package containing the {command}`volnoti` program.
'';
};
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 = "${lib.getExe cfg.package} -v -n"; };
2021-07-21 06:17:27 +02:00
};
};
}