mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
status-notifier-watcher: add service
This commit is contained in:
parent
4f67e8d0c3
commit
2e9e1909da
3 changed files with 54 additions and 0 deletions
|
@ -718,6 +718,13 @@ in
|
||||||
A new module is available: 'services.mpd'.
|
A new module is available: 'services.mpd'.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
time = "2018-07-31T13:33:39+00:00";
|
||||||
|
message = ''
|
||||||
|
A new module is available: 'services.status-notifier-watcher'.
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,6 +73,7 @@ let
|
||||||
./services/redshift.nix
|
./services/redshift.nix
|
||||||
./services/screen-locker.nix
|
./services/screen-locker.nix
|
||||||
./services/stalonetray.nix
|
./services/stalonetray.nix
|
||||||
|
./services/status-notifier-watcher.nix
|
||||||
./services/syncthing.nix
|
./services/syncthing.nix
|
||||||
./services/taffybar.nix
|
./services/taffybar.nix
|
||||||
./services/tahoe-lafs.nix
|
./services/tahoe-lafs.nix
|
||||||
|
|
46
modules/services/status-notifier-watcher.nix
Normal file
46
modules/services/status-notifier-watcher.nix
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.services.status-notifier-watcher;
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
{
|
||||||
|
meta.maintainers = [ maintainers.pltanton ];
|
||||||
|
|
||||||
|
options = {
|
||||||
|
services.status-notifier-watcher = {
|
||||||
|
enable = mkEnableOption "Status Notifier Watcher";
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
default = pkgs.haskellPackages.status-notifier-item;
|
||||||
|
defaultText = "pkgs.haskellPackages.status-notifier-item";
|
||||||
|
type = types.package;
|
||||||
|
example = literalExample "pkgs.haskellPackages.status-notifier-item";
|
||||||
|
description = "The package to use for the status notifier watcher binary.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
systemd.user.services.status-notifier-watcher = {
|
||||||
|
Unit = {
|
||||||
|
Description = "SNI watcher";
|
||||||
|
After = [ "graphical-session-pre.target" ];
|
||||||
|
PartOf = [ "graphical-session.target" ];
|
||||||
|
Before = [ "taffybar.service" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
Service = {
|
||||||
|
ExecStart = "${cfg.package}/bin/status-notifier-watcher";
|
||||||
|
};
|
||||||
|
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "graphical-session.target" "taffybar.service" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue