587713944a
GitOrigin-RevId: 6143fc5eeb9c4f00163267708e26191d1e918932
32 lines
884 B
Nix
32 lines
884 B
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
let
|
|
cfg = config.programs.oddjobd;
|
|
in
|
|
{
|
|
options = {
|
|
programs.oddjobd = {
|
|
enable = lib.mkEnableOption "oddjob, a D-Bus service which runs odd jobs on behalf of client applications";
|
|
package = lib.mkPackageOption pkgs "oddjob" {};
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
systemd.services.oddjobd = {
|
|
wantedBy = [ "multi-user.target" ];
|
|
after = [ "network.target" "dbus.service" ];
|
|
description = "DBUS Odd-job Daemon";
|
|
enable = true;
|
|
documentation = [ "man:oddjobd(8)" "man:oddjobd.conf(5)" ];
|
|
serviceConfig = {
|
|
Type = "simple";
|
|
PIDFile = "/run/oddjobd.pid";
|
|
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 ];
|
|
}
|