about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorSarah Brofeldt <sarah@qtr.dk>2024-06-03 09:51:19 +0200
committerSarah Brofeldt <sarah@qtr.dk>2024-06-03 09:56:42 +0200
commitf7393d13fe676bc74cc015838a248493439a9041 (patch)
treeb280ba20ea31cf416226f8f7a362e3aaaf7f5310 /nixos/modules
parent57610d2f8f0937f39dbd72251e9614b1561942d8 (diff)
nixos/garage: fix replication 1.0 assertion
Use the `cfg.package.version` (string) instead of the entire package so
users don't see  `error: value is a set while a string was expected`
instead of the intended assertion message.
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/web-servers/garage.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/web-servers/garage.nix b/nixos/modules/services/web-servers/garage.nix
index 8d1966aee091b..7cf71ff6ff06f 100644
--- a/nixos/modules/services/web-servers/garage.nix
+++ b/nixos/modules/services/web-servers/garage.nix
@@ -83,7 +83,7 @@ in
       # These assertions can be removed in NixOS 24.11, when all users have been
       # warned once.
       {
-        assertion = (cfg.settings ? replication_factor || cfg.settings ? replication_mode) || lib.versionOlder cfg.package "1.0.0";
+        assertion = (cfg.settings ? replication_factor || cfg.settings ? replication_mode) || lib.versionOlder cfg.package.version "1.0.0";
         message = ''
           Garage 1.0.0 requires an explicit replication factor to be set.
           Please set replication_factor to 1 explicitly to preserve the previous behavior.