-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b8b554
commit f6fe8fa
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
config, | ||
pkgs, | ||
lib, | ||
... | ||
}: | ||
|
||
let | ||
inherit (lib) mkEnableOption mkIf mdDoc; | ||
cfg = config.services.realmd; | ||
in | ||
{ | ||
options.services.realmd = { | ||
enable = mkEnableOption ( | ||
mdDoc "realmd service for managing system enrollment in Active Directory domains" | ||
); | ||
}; | ||
|
||
config = mkIf cfg.enable { | ||
environment.systemPackages = [ pkgs.realmd ]; | ||
|
||
services.dbus = { | ||
enable = true; | ||
packages = [ pkgs.realmd ]; | ||
}; | ||
|
||
systemd.services.realmd = { | ||
description = "Realm and Domain Configuration"; | ||
wantedBy = [ "multi-user.target" ]; | ||
partOf = [ "dbus.service" ]; | ||
requires = [ "dbus.service" ]; | ||
after = [ | ||
"network.target" | ||
"dbus.service" | ||
]; | ||
serviceConfig = { | ||
Type = "dbus"; | ||
BusName = "org.freedesktop.realmd"; | ||
ExecStart = "${pkgs.realmd}/libexec/realmd"; | ||
RuntimeDirectory = "realmd"; | ||
}; | ||
}; | ||
}; | ||
} |