From 799a1dede91fd8aaec6793bf9ac5544bb72bcb34 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 7 Jun 2024 02:53:53 +0200 Subject: [PATCH] cluster/services/storage: prepare for s3ql upgrades --- cluster/services/storage/default.nix | 10 ++++++++-- cluster/services/storage/s3ql-upgrades.nix | 12 ++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 cluster/services/storage/s3ql-upgrades.nix 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; +}