Merge pull request #235440 from lheckemann/garage

nixos/garage: allow unsafe replication modes, restart on config change
This commit is contained in:
Linus Heckemann 2023-06-02 19:22:03 +02:00 committed by GitHub
commit 15c3a653d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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";