summaryrefslogtreecommitdiffstats
path: root/nixos/modules/services/networking/gdomap.nix
diff options
context:
space:
mode:
authorArtyom Shalkhakov <artyom.shalkhakov@gmail.com>2014-12-13 22:48:39 +0600
committerMatthew Bauer <mjbauer95@gmail.com>2016-08-16 21:00:21 +0000
commit9b17cd8fab54b8a06e32109299e4102fcdf3d53d (patch)
tree2d758f2ba18b843537765462c2e1804d923b11ed /nixos/modules/services/networking/gdomap.nix
parentcf79db354987dba564c96d8f7ee1c360e54ca0cb (diff)
gnustep: add nixos deamons
Adding basic daemons: gdomap and gdnc. It seems that GWorkspace does is unable to work properly without the daemons.
Diffstat (limited to 'nixos/modules/services/networking/gdomap.nix')
-rw-r--r--nixos/modules/services/networking/gdomap.nix50
1 files changed, 50 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/gdomap.nix b/nixos/modules/services/networking/gdomap.nix
new file mode 100644
index 000000000000..b4cef96eb879
--- /dev/null
+++ b/nixos/modules/services/networking/gdomap.nix
@@ -0,0 +1,50 @@
+{ config, lib, pkgs, ... }:
+
+with lib;
+
+let
+ cfg = config.services.gdomap;
+ stateDir = "/var/lib/gdomap";
+in
+{
+ #
+ # interface
+ #
+ options = {
+ services.gdomap = {
+ enable = mkOption {
+ default = false;
+ description = "
+ Whether to enable gdomap, the GNUstep distributed objects daemon.
+
+ Note that gdomap runs as root.
+ ";
+ };
+ };
+ };
+ #
+ # implementation
+ #
+ config = mkIf config.services.gdomap.enable {
+ # NOTE: gdomap runs as root
+ systemd.services.gdomap = {
+ description = "gdomap server";
+ wantedBy = [ "multi-user.target" ];
+ after = [ "network.target" ];
+ path = [ pkgs.gnustep_base ];
+ preStart = ''
+ mkdir -m 755 -p ${stateDir}
+ mkdir -m 755 -p /run/gdomap
+ '';
+ serviceConfig = {
+ # NOTE: this is local-only configuration!
+ ExecStart = "@${pkgs.gnustep_base}/bin/gdomap"
+ + " -j ${stateDir} -p";
+ Restart = "always"; # "no";
+ RestartSec = 2;
+ TimeoutStartSec = "30";
+ Type = "forking";
+ };
+ };
+ };
+} \ No newline at end of file