1{ config, lib, pkgs, ... }:
2
3with lib;
4
5let
6 cfg = config.services.gdomap;
7in
8{
9 #
10 # interface
11 #
12 options = {
13 services.gdomap = {
14 enable = mkEnableOption "GNUstep Distributed Objects name server";
15 };
16 };
17
18 #
19 # implementation
20 #
21 config = mkIf config.services.gdomap.enable {
22 # NOTE: gdomap runs as root
23 # TODO: extra user for gdomap?
24 systemd.services.gdomap = {
25 description = "gdomap server";
26 wantedBy = [ "multi-user.target" ];
27 after = [ "network.target" ];
28 path = [ pkgs.gnustep.base ];
29 serviceConfig.ExecStart = "${pkgs.gnustep.base}/bin/gdomap -f";
30 };
31 };
32}