diff --git a/nixos/modules/services/network-filesystems/drbd.nix b/nixos/modules/services/network-filesystems/drbd.nix index 916e7eaaaa94..c730e0b34e90 100644 --- a/nixos/modules/services/network-filesystems/drbd.nix +++ b/nixos/modules/services/network-filesystems/drbd.nix @@ -47,19 +47,17 @@ let cfg = config.services.drbd; in options drbd usermode_helper=/run/current-system/sw/bin/drbdadm ''; - environment.etc.drbd.conf = + environment.etc."drbd.conf" = { source = pkgs.writeText "drbd.conf" cfg.config; }; systemd.services.drbd = { after = [ "systemd-udev.settle.service" "network.target" ]; wants = [ "systemd-udev.settle.service" ]; wantedBy = [ "multi-user.target" ]; - script = '' - ${pkgs.drbd}/sbin/drbdadm up all - ''; - serviceConfig.ExecStop = '' - ${pkgs.drbd}/sbin/drbdadm down all - ''; + serviceConfig = { + ExecStart = "${pkgs.drbd}/sbin/drbdadm up all"; + ExecStop = "${pkgs.drbd}/sbin/drbdadm down all"; + }; }; }; }