1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2024-12-14 11:57:55 +00:00
home-manager/modules/services/volnoti.nix
Naïm Favier bd11e2c5e6
Replace usage of literalExample
Instead use the new function `literalExpression`. See

  https://github.com/NixOS/nixpkgs/pull/136909
2021-10-13 00:16:10 +02:00

43 lines
922 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 = literalExpression "pkgs.volnoti";
description = ''
Package containing the <command>volnoti</command> program.
'';
};
};
};
config = mkIf cfg.enable {
assertions = [
(lib.hm.assertions.assertPlatform "services.volnoti" pkgs
lib.platforms.linux)
];
home.packages = [ cfg.package ];
systemd.user.services.volnoti = {
Unit = { Description = "volnoti"; };
Install = { WantedBy = [ "graphical-session.target" ]; };
Service = { ExecStart = "${pkgs.volnoti}/bin/volnoti -v -n"; };
};
};
}