gnustep: fix naming of gnustep stuff

This should fix the NixOS issues.
This commit is contained in:
Matthew Bauer 2016-07-06 18:28:21 -05:00
parent 387d5e07fd
commit 5ea9bd0920
2 changed files with 10 additions and 25 deletions

View File

@ -11,22 +11,10 @@ in
# #
options = { options = {
services.gdomap = { services.gdomap = {
enable = mkOption { enable = mkEnableOption "Whether to enable gdomap, the GNUstep distributed objects daemon";
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";
};
};
};
# #
# implementation # implementation
# #
@ -37,10 +25,10 @@ in
description = "gdomap server"; description = "gdomap server";
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
after = [ "network.target" ]; after = [ "network.target" ];
path = [ pkgs.gnustep_base ]; path = [ pkgs.gnustep.base ];
serviceConfig = { serviceConfig = {
PIDFile = cfg.pidfile; PIDFile = cfg.pidfile;
ExecStart = "@${pkgs.gnustep_base}/bin/gdomap" ExecStart = "@${pkgs.gnustep.base}/bin/gdomap"
+ " -d -p" + " -d -p"
+ " -I ${cfg.pidfile}"; + " -I ${cfg.pidfile}";
Restart = "always"; Restart = "always";

View File

@ -5,26 +5,23 @@ let
cfg = config.services.gdnc; cfg = config.services.gdnc;
in { in {
options = { options = {
services.gdnc.enable = mkOption { services.gdnc.enable = mkEnableOption "Enable gdnc, the GNUstep distributed notification center";
type = types.bool;
default = false;
example = true;
description = "Enable gdnc, the GNUstep distributed notification center";
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
assertions = singleton { assertions = singleton {
assertion = config.services.gdnc.enable -> config.services.gdomap.enable; assertion = config.services.gdnc.enable -> config.services.gdomap.enable;
message = "Cannot start gdnc without starting gdomap"; 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 = { systemd.services.gdnc = {
path = [ pkgs.gnustep_base ]; path = [ pkgs.gnustep.base ];
description = "gdnc: GNUstep distributed notification center"; description = "gdnc: GNUstep distributed notification center";
requires = [ "gdomap.service" ]; requires = [ "gdomap.service" ];
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
serviceConfig = { serviceConfig = {
ExecStart = ''${pkgs.gnustep_base}/bin/gdnc -f''; ExecStart = ''
${pkgs.gnustep.base}/bin/gdnc -f
'';
Restart = "always"; Restart = "always";
RestartSec = 10; RestartSec = 10;
TimeoutStartSec = "30"; TimeoutStartSec = "30";