nixos/realmd: init
This commit is contained in:
@@ -849,6 +849,7 @@
|
||||
./services/misc/radarr.nix
|
||||
./services/misc/radicle.nix
|
||||
./services/misc/readarr.nix
|
||||
./services/misc/realmd.nix
|
||||
./services/misc/redlib.nix
|
||||
./services/misc/redmine.nix
|
||||
./services/misc/renovate.nix
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf mkPackageOption;
|
||||
cfg = config.services.realmd;
|
||||
in
|
||||
{
|
||||
options.services.realmd = {
|
||||
enable = mkEnableOption "realmd service for managing system enrollment in Active Directory domains";
|
||||
|
||||
package = mkPackageOption pkgs "realmd" { };
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
|
||||
services.dbus = {
|
||||
enable = true;
|
||||
packages = [ cfg.package ];
|
||||
};
|
||||
|
||||
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 = "${cfg.package}/libexec/realmd";
|
||||
RuntimeDirectory = "realmd";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user