Skip to content

Commit

Permalink
nixos/realmd: init
Browse files Browse the repository at this point in the history
  • Loading branch information
liberodark committed Jan 9, 2025
1 parent 3b8b554 commit f6fe8fa
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions nixos/modules/services/misc/realmd.nix
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";
};
};
};
}

0 comments on commit f6fe8fa

Please sign in to comment.