From 697982b91bfdce68758d79ce01b0fa1b444105ef Mon Sep 17 00:00:00 2001 From: Artyom Shalkhakov Date: Thu, 29 Jan 2015 21:56:26 +0600 Subject: [PATCH] gnustep: fix gdnc, gdomap Both gdnc and gdomap seem to work. --- nixos/modules/services/networking/gdomap.nix | 19 ++++++++----------- nixos/modules/services/x11/gdnc.nix | 5 ++--- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/nixos/modules/services/networking/gdomap.nix b/nixos/modules/services/networking/gdomap.nix index da78810f6b2..7b5ba4fcf10 100644 --- a/nixos/modules/services/networking/gdomap.nix +++ b/nixos/modules/services/networking/gdomap.nix @@ -4,7 +4,6 @@ with lib; let cfg = config.services.gdomap; - pidFile = "${cfg.pidDir}/gdomap.pid"; in { # @@ -20,9 +19,11 @@ in Note that gdomap runs as root. "; }; - pidDir = mkOption { - default = "/var/run/gdomap"; - description = "Location of the file which stores the PID of gdomap"; + + pidfile = mkOption { + type = types.path; + default = "/tmp/gdomap.pid"; + description = "Location of the pid file for gdomap daemon"; }; }; }; @@ -37,15 +38,11 @@ in wantedBy = [ "multi-user.target" ]; after = [ "network.target" ]; path = [ pkgs.gnustep_base ]; - preStart = '' - mkdir -m 0700 -p ${cfg.pidDir} - chown -R nobody:nobody ${cfg.pidDir} - ''; serviceConfig = { + PIDFile = cfg.pidfile; ExecStart = "@${pkgs.gnustep_base}/bin/gdomap" + " -d -p" - + " -I ${pidFile}"; -# + " -j ${cfg.pidDir}"; + + " -I ${cfg.pidfile}"; Restart = "always"; RestartSec = 2; TimeoutStartSec = "30"; @@ -53,4 +50,4 @@ in }; }; }; -} \ No newline at end of file +} diff --git a/nixos/modules/services/x11/gdnc.nix b/nixos/modules/services/x11/gdnc.nix index 87f34972df2..dc17374191b 100644 --- a/nixos/modules/services/x11/gdnc.nix +++ b/nixos/modules/services/x11/gdnc.nix @@ -24,12 +24,11 @@ in { requires = [ "gdomap.service" ]; wantedBy = [ "multi-user.target" ]; serviceConfig = { - ExecStart = ''${pkgs.gnustep_base}/bin/gdnc --verbose''; + ExecStart = ''${pkgs.gnustep_base}/bin/gdnc -f''; Restart = "always"; RestartSec = 10; TimeoutStartSec = "30"; - Type = "simple"; }; }; }; -} \ No newline at end of file +}