mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
poweralertd: add module (#1951)
This commit is contained in:
parent
d4278212b5
commit
865e404826
4 changed files with 42 additions and 0 deletions
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
|
@ -225,6 +225,8 @@
|
||||||
/modules/services/playerctld.nix @fendse
|
/modules/services/playerctld.nix @fendse
|
||||||
/tests/modules/playerctld @fendse
|
/tests/modules/playerctld @fendse
|
||||||
|
|
||||||
|
/modules/services/poweralertd.nix @ThibautMarty
|
||||||
|
|
||||||
/modules/services/pulseeffects.nix @jonringer
|
/modules/services/pulseeffects.nix @jonringer
|
||||||
|
|
||||||
/modules/services/random-background.nix @rycee
|
/modules/services/random-background.nix @rycee
|
||||||
|
|
|
@ -1906,6 +1906,14 @@ in
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
time = "2021-04-26T07:00:00+00:00";
|
||||||
|
condition = hostPlatform.isLinux;
|
||||||
|
message = ''
|
||||||
|
A new service is available: 'services.poweralertd'.
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -181,6 +181,7 @@ let
|
||||||
(loadModule ./services/plan9port.nix { condition = hostPlatform.isLinux; })
|
(loadModule ./services/plan9port.nix { condition = hostPlatform.isLinux; })
|
||||||
(loadModule ./services/playerctld.nix { condition = hostPlatform.isLinux; })
|
(loadModule ./services/playerctld.nix { condition = hostPlatform.isLinux; })
|
||||||
(loadModule ./services/polybar.nix { })
|
(loadModule ./services/polybar.nix { })
|
||||||
|
(loadModule ./services/poweralertd.nix { condition = hostPlatform.isLinux; })
|
||||||
(loadModule ./services/pulseeffects.nix { condition = hostPlatform.isLinux; })
|
(loadModule ./services/pulseeffects.nix { condition = hostPlatform.isLinux; })
|
||||||
(loadModule ./services/random-background.nix { })
|
(loadModule ./services/random-background.nix { })
|
||||||
(loadModule ./services/redshift-gammastep/redshift.nix { })
|
(loadModule ./services/redshift-gammastep/redshift.nix { })
|
||||||
|
|
31
modules/services/poweralertd.nix
Normal file
31
modules/services/poweralertd.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let cfg = config.services.poweralertd;
|
||||||
|
|
||||||
|
in {
|
||||||
|
meta.maintainers = [ maintainers.thibautmarty ];
|
||||||
|
|
||||||
|
options.services.poweralertd.enable =
|
||||||
|
mkEnableOption "the Upower-powered power alerterd";
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
systemd.user.services.poweralertd = {
|
||||||
|
Unit = {
|
||||||
|
Description = "UPower-powered power alerter";
|
||||||
|
Documentation = "man:poweralertd(1)";
|
||||||
|
After = [ "graphical-session-pre.target" ];
|
||||||
|
PartOf = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
Install.WantedBy = [ "graphical-session.target" ];
|
||||||
|
|
||||||
|
Service = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = "${pkgs.poweralertd}/bin/poweralertd";
|
||||||
|
Restart = "always";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue