From 8fb4d54b964ea49799802e34026a33a5e7e10498 Mon Sep 17 00:00:00 2001 From: lurchi Date: Mon, 9 Mar 2020 17:43:20 +0100 Subject: [PATCH] add user service --- nixos/modules/gnunet/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/nixos/modules/gnunet/default.nix b/nixos/modules/gnunet/default.nix index 5c3e638..2cb5aa7 100644 --- a/nixos/modules/gnunet/default.nix +++ b/nixos/modules/gnunet/default.nix @@ -145,8 +145,8 @@ in # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${config.system.nssModules.path} #''; - systemd.services.gnunet = { - description = "GNUnet"; + systemd.services.gnunet-system = { + description = "GNUnet system services"; after = [ "network-online.target" ]; wantedBy = [ "multi-user.target" ]; path = [ cfg.package pkgs.miniupnpc ]; @@ -159,6 +159,15 @@ in serviceConfig.WorkingDirectory = homeDir; }; + systemd.user.services.gnunet-user = { + description = "GNUnet user services"; + after = [ "gnunet-system.service" ]; + wantedBy = [ "default.target" ]; + environment.TMPDIR = "/tmp"; + serviceConfig.ExecStart = "${cfg.package}/lib/gnunet/libexec/gnunet-service-arm"; + serviceConfig.ExecStop = "${cfg.package}/bin/gnunet-arm -e"; + }; + }; }