diff --git a/cluster/services/storage/default.nix b/cluster/services/storage/default.nix index c2a5a7a..615bb73 100644 --- a/cluster/services/storage/default.nix +++ b/cluster/services/storage/default.nix @@ -19,8 +19,14 @@ in garageExternal = [ "grail" "prophet" ]; }; nixos = { - external = [ ./external.nix ]; - heresy = [ ./heresy.nix ]; + external = [ + ./external.nix + ./s3ql-upgrades.nix + ]; + heresy = [ + ./heresy.nix + ./s3ql-upgrades.nix + ]; garage = [ ./garage.nix ./garage-options.nix diff --git a/cluster/services/storage/s3ql-upgrades.nix b/cluster/services/storage/s3ql-upgrades.nix new file mode 100644 index 0000000..a020d17 --- /dev/null +++ b/cluster/services/storage/s3ql-upgrades.nix @@ -0,0 +1,12 @@ +{ config, lib, ... }: + +{ + system.ascensions = lib.mapAttrs' (name: fs: { + name = "s3ql-${name}"; + value = { + requiredBy = [ "${fs.unitName}.service" ]; + before = [ "${fs.unitName}.service" ]; + incantations = i: [ ]; + }; + }) config.services.external-storage.fileSystems; +}