git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/drbd: fix

- fix environment.etc."drbd.conf" - don't generate an ExecStart script for just one command

commitaa37441c3ee910ae071156cb8914f767c8403baf authorRyan Mulligan <ryan@ryantm.com> dateTue 30 Nov 2021, 21:40 (5 years ago) parent036b909
1 file changed+5−7
nixos/modules/services/network-filesystems/drbd.nix+5−7
nixos/modules/services/network-filesystems/drbd.nix+5−7
@@ -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}