mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
d36353cf86
Unfortunately there's no test for me to confirm that it works, so all I can do is ask for maintainers, unfortunately -- I mean... This is your opportunity!
34 lines
887 B
Nix
34 lines
887 B
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
let
|
|
cfg = config.programs.oddjobd;
|
|
in
|
|
{
|
|
options.programs.oddjobd = {
|
|
enable = lib.mkEnableOption "oddjob";
|
|
package = lib.mkPackageOption pkgs "oddjob" {};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
assertions = [
|
|
{ assertion = false;
|
|
message = "The oddjob service was found to be broken without NixOS test or maintainer. Please take ownership of this service.";
|
|
}
|
|
];
|
|
systemd.packages = [ cfg.package ];
|
|
|
|
systemd.services.oddjobd = {
|
|
wantedBy = [ "multi-user.target"];
|
|
after = [ "network.target"];
|
|
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";
|
|
};
|
|
};
|
|
};
|
|
}
|