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;
|
||||
in
|
||||
{
|
||||
options.programs.oddjobd = {
|
||||
enable = lib.mkEnableOption "oddjob";
|
||||
package = lib.mkPackageOption pkgs "oddjob" {};
|
||||
options = {
|
||||
programs.oddjobd = {
|
||||
enable = lib.mkEnableOption "oddjob";
|
||||
package = lib.mkPackageOption pkgs "oddjob" {};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.packages = [ cfg.package ];
|
||||
|
||||
systemd.services.oddjobd = {
|
||||
wantedBy = [ "multi-user.target"];
|
||||
after = [ "network.target"];
|
||||
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 = "dbus";
|
||||
BusName = "org.freedesktop.oddjob";
|
||||
ExecStart = "${lib.getBin cfg.package}/bin/oddjobd";
|
||||
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 ];
|
||||
|
|
Loading…
Reference in a new issue