Merge "cluster/nix: symlink /sbin/lvm"
diff --git a/cluster/nix/modules/base.nix b/cluster/nix/modules/base.nix
index 034d1cd..29f2072 100644
--- a/cluster/nix/modules/base.nix
+++ b/cluster/nix/modules/base.nix
@@ -54,6 +54,15 @@
# Use Chrony instead of systemd-timesyncd
services.chrony.enable = true;
+ # Symlink lvm into /sbin/lvm on activation. This is needed by Rook OSD
+ # instances running on Kubernetes.
+ # See: https://github.com/rook/rook/commit/f3c4975e353e3ce3599c958ec6d2cae8ee8f6f61
+ system.activationScripts.sbinlvm =
+ ''
+ mkdir -m 0755 -p /sbin
+ ln -sfn ${pkgs.lvm2.bin}/bin/lvm /sbin/lvm
+ '';
+
# Enable the OpenSSH daemon.
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keys = [