diff options
author | Robin Gloster <mail@glob.in> | 2016-01-06 06:50:18 +0000 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2016-01-07 06:39:06 +0000 |
commit | 88292fdf09960e9cb8e3c063a6b95ac4284222ec (patch) | |
tree | 34ff267ed7bacf9fd906b1736476b431e9afe909 /nixos/modules/services/networking/amuled.nix | |
parent | af50b03f50d88954e98018c7c18c0581928b7165 (diff) |
jobs -> systemd.services
Diffstat (limited to 'nixos/modules/services/networking/amuled.nix')
-rw-r--r-- | nixos/modules/services/networking/amuled.nix | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/nixos/modules/services/networking/amuled.nix b/nixos/modules/services/networking/amuled.nix index 516238fdddf6..bc488d0e9100 100644 --- a/nixos/modules/services/networking/amuled.nix +++ b/nixos/modules/services/networking/amuled.nix @@ -57,22 +57,19 @@ in gid = config.ids.gids.amule; } ]; - jobs.amuled = - { description = "AMule daemon"; - - startOn = "ip-up"; - - preStart = '' - mkdir -p ${cfg.dataDir} - chown ${user} ${cfg.dataDir} - ''; - - exec = '' - ${pkgs.su}/bin/su -s ${pkgs.stdenv.shell} ${user} \ - -c 'HOME="${cfg.dataDir}" ${pkgs.amuleDaemon}/bin/amuled' - ''; - }; - + systemd.services.amuled = { + description = "AMule daemon"; + wantedBy = [ "ip-up.target" ]; + + preStart = '' + mkdir -p ${cfg.dataDir} + chown ${user} ${cfg.dataDir} + ''; + + script = '' + ${pkgs.su}/bin/su -s ${pkgs.stdenv.shell} ${user} \ + -c 'HOME="${cfg.dataDir}" ${pkgs.amuleDaemon}/bin/amuled' + ''; + }; }; - } |