diff --git a/nix/nixos-module/pacemaker.nix b/nix/nixos-module/pacemaker.nix index 3cf29e6..c4dec63 100644 --- a/nix/nixos-module/pacemaker.nix +++ b/nix/nixos-module/pacemaker.nix @@ -144,29 +144,10 @@ in { requires = [ "corosync.service" ]; wantedBy = [ "multi-user.target" ]; - script = - let - cibXml = builtins.toFile "cib.xml" '' - - - - - ${lib.concatMapStrings ({ nodeid, name, ring_addrs }: '' - - '') config.services.corosync.nodelist} - - - - - - - - ''; - in '' - cp ${cibXml} /var/lib/pacemaker/cib/cib.xml - chown hacluster:pacemaker /var/lib/pacemaker/cib/cib.xml + script = '' + cp -srf ${cfg.package}/var/lib/pacemaker/* /var/lib/pacemaker/ - exec ${cfg.package}/sbin/pacemakerd + exec ${cfg.package}/sbin/pacemakerd ''; serviceConfig = { Type = "simple";