mirror of
https://github.com/nix-community/home-manager
synced 2024-11-04 18:29:45 +01:00
36 lines
772 B
Nix
36 lines
772 B
Nix
|
{ 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 {
|
||
|
home.packages = [ cfg.package ];
|
||
|
systemd.user.services.volnoti = {
|
||
|
Unit = { Description = "volnoti"; };
|
||
|
|
||
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||
|
|
||
|
Service = { ExecStart = "${pkgs.volnoti}/bin/volnoti -v -n"; };
|
||
|
};
|
||
|
};
|
||
|
}
|