diff --git a/nixos/modules/services/networking/gdomap.nix b/nixos/modules/services/networking/gdomap.nix index 7b5ba4fcf100..7f2d2159b481 100644 --- a/nixos/modules/services/networking/gdomap.nix +++ b/nixos/modules/services/networking/gdomap.nix @@ -11,22 +11,10 @@ in # options = { services.gdomap = { - enable = mkOption { - default = false; - description = " - Whether to enable gdomap, the GNUstep distributed objects daemon. - - Note that gdomap runs as root. - "; - }; - - pidfile = mkOption { - type = types.path; - default = "/tmp/gdomap.pid"; - description = "Location of the pid file for gdomap daemon"; - }; + enable = mkEnableOption "Whether to enable gdomap, the GNUstep distributed objects daemon"; }; }; + # # implementation # @@ -37,10 +25,10 @@ in description = "gdomap server"; wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; - path = [ pkgs.gnustep_base ]; + path = [ pkgs.gnustep.base ]; serviceConfig = { PIDFile = cfg.pidfile; - ExecStart = "@${pkgs.gnustep_base}/bin/gdomap" + ExecStart = "@${pkgs.gnustep.base}/bin/gdomap" + " -d -p" + " -I ${cfg.pidfile}"; Restart = "always"; diff --git a/nixos/modules/services/x11/gdnc.nix b/nixos/modules/services/x11/gdnc.nix index dc17374191bd..965776e359f5 100644 --- a/nixos/modules/services/x11/gdnc.nix +++ b/nixos/modules/services/x11/gdnc.nix @@ -5,26 +5,23 @@ let cfg = config.services.gdnc; in { options = { - services.gdnc.enable = mkOption { - type = types.bool; - default = false; - example = true; - description = "Enable gdnc, the GNUstep distributed notification center"; - }; + services.gdnc.enable = mkEnableOption "Enable gdnc, the GNUstep distributed notification center"; }; config = mkIf cfg.enable { assertions = singleton { assertion = config.services.gdnc.enable -> config.services.gdomap.enable; message = "Cannot start gdnc without starting gdomap"; }; - environment.systemPackages = [ pkgs.gnustep_make pkgs.gnustep_base ]; + environment.systemPackages = [ pkgs.gnustep.make pkgs.gnustep.base ]; systemd.services.gdnc = { - path = [ pkgs.gnustep_base ]; + path = [ pkgs.gnustep.base ]; description = "gdnc: GNUstep distributed notification center"; requires = [ "gdomap.service" ]; wantedBy = [ "multi-user.target" ]; serviceConfig = { - ExecStart = ''${pkgs.gnustep_base}/bin/gdnc -f''; + ExecStart = '' + ${pkgs.gnustep.base}/bin/gdnc -f + ''; Restart = "always"; RestartSec = 10; TimeoutStartSec = "30";