mirror of
https://github.com/nix-community/home-manager
synced 2024-11-10 21:29:48 +01:00
poweralertd: Enable passing CLI args to the daemon
This commit is contained in:
parent
6b1912380e
commit
8d7e352a4b
1 changed files with 15 additions and 3 deletions
|
@ -7,8 +7,18 @@ let cfg = config.services.poweralertd;
|
||||||
in {
|
in {
|
||||||
meta.maintainers = [ maintainers.thibautmarty ];
|
meta.maintainers = [ maintainers.thibautmarty ];
|
||||||
|
|
||||||
options.services.poweralertd.enable =
|
options.services.poweralertd = {
|
||||||
mkEnableOption "the Upower-powered power alertd";
|
enable = mkEnableOption "the Upower-powered power alertd";
|
||||||
|
|
||||||
|
extraArgs = mkOption {
|
||||||
|
type = with types; listOf str;
|
||||||
|
default = [ ];
|
||||||
|
example = [ "-s" "-S" ];
|
||||||
|
description = ''
|
||||||
|
Extra command line arguments to pass to poweralertd.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
assertions = [
|
assertions = [
|
||||||
|
@ -28,7 +38,9 @@ in {
|
||||||
|
|
||||||
Service = {
|
Service = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
ExecStart = "${pkgs.poweralertd}/bin/poweralertd";
|
ExecStart = "${pkgs.poweralertd}/bin/poweralertd ${
|
||||||
|
utils.escapeSystemdExecArgs cfg.extraArgs
|
||||||
|
}";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue