nixos/garage: allow unsafe replication modes, restart on config change

This commit is contained in:
Linus Heckemann 2023-06-01 17:03:42 +02:00
parent 4f53efe34b
commit c4f727c944

View file

@ -49,7 +49,7 @@ in
replication_mode = mkOption {
default = "none";
type = types.enum ([ "none" "1" "2" "3" 1 2 3 ]);
type = types.enum ([ "none" "1" "2" "3" "2-dangerous" "3-dangerous" "3-degraded" 1 2 3 ]);
apply = v: toString v;
description = lib.mdDoc "Garage replication mode, defaults to none, see: <https://garagehq.deuxfleurs.fr/documentation/reference-manual/configuration/#replication-mode> for reference.";
};
@ -80,6 +80,7 @@ in
after = [ "network.target" "network-online.target" ];
wants = [ "network.target" "network-online.target" ];
wantedBy = [ "multi-user.target" ];
restartTriggers = [ configFile ];
serviceConfig = {
ExecStart = "${cfg.package}/bin/garage server";