@@ -47,19 +47,17 @@ let cfg = config.services.drbd; in
4747 options drbd usermode_helper=/run/current-system/sw/bin/drbdadm
4848 '';
4949
50− environment.etc.drbd.conf =
50+ environment.etc."drbd.conf" =
5151 { source = pkgs.writeText "drbd.conf" cfg.config; };
5252
5353 systemd.services.drbd = {
5454 after = [ "systemd-udev.settle.service" "network.target" ];
5555 wants = [ "systemd-udev.settle.service" ];
5656 wantedBy = [ "multi-user.target" ];
57− script = ''
58− ${pkgs.drbd}/sbin/drbdadm up all
59− '';
60− serviceConfig.ExecStop = ''
61− ${pkgs.drbd}/sbin/drbdadm down all
62− '';
57+ serviceConfig = {
58+ ExecStart = "${pkgs.drbd}/sbin/drbdadm up all";
59+ ExecStop = "${pkgs.drbd}/sbin/drbdadm down all";
60+ };
6361 };
6462 };
6563}