nixos/oddjobd: enable oddjob dbus service
This commit is contained in:
parent
b0f78fba37
commit
9a03f2ca13
1 changed files with 12 additions and 10 deletions
|
@ -4,26 +4,28 @@ let
|
||||||
cfg = config.programs.oddjobd;
|
cfg = config.programs.oddjobd;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.oddjobd = {
|
options = {
|
||||||
enable = lib.mkEnableOption "oddjob";
|
programs.oddjobd = {
|
||||||
package = lib.mkPackageOption pkgs "oddjob" {};
|
enable = lib.mkEnableOption "oddjob";
|
||||||
|
package = lib.mkPackageOption pkgs "oddjob" {};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
systemd.packages = [ cfg.package ];
|
|
||||||
|
|
||||||
systemd.services.oddjobd = {
|
systemd.services.oddjobd = {
|
||||||
wantedBy = [ "multi-user.target"];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network.target"];
|
after = [ "network.target" "dbus.service" ];
|
||||||
description = "DBUS Odd-job Daemon";
|
description = "DBUS Odd-job Daemon";
|
||||||
enable = true;
|
enable = true;
|
||||||
documentation = [ "man:oddjobd(8)" "man:oddjobd.conf(5)" ];
|
documentation = [ "man:oddjobd(8)" "man:oddjobd.conf(5)" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "dbus";
|
Type = "simple";
|
||||||
BusName = "org.freedesktop.oddjob";
|
PIDFile = "/run/oddjobd.pid";
|
||||||
ExecStart = "${lib.getBin cfg.package}/bin/oddjobd";
|
ExecStart = "${lib.getBin cfg.package}/bin/oddjobd -n -p /run/oddjobd.pid -t 300";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.dbus.packages = [ cfg.package ];
|
||||||
};
|
};
|
||||||
|
|
||||||
meta.maintainers = with lib.maintainers; [ SohamG ];
|
meta.maintainers = with lib.maintainers; [ SohamG ];
|
||||||
|
|
Loading…
Reference in a new issue