1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-30 06:59:45 +01:00
home-manager/modules/services/volnoti.nix

42 lines
893 B
Nix
Raw Permalink Normal View History

2021-07-21 06:17:27 +02:00
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.volnoti;
in {
meta.maintainers = [ maintainers.imalison ];
options = {
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.
'';
};
};
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"; };
};
};
}