From a697ebec1704cd9a7d5f9990f93c57c54235347f Mon Sep 17 00:00:00 2001 From: Ryan Yin Date: Mon, 18 Mar 2024 23:39:43 +0800 Subject: [PATCH] feat: longhorn & iscsi --- hosts/k8s/lib.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/hosts/k8s/lib.nix b/hosts/k8s/lib.nix index f5f3fce2..a5a6fcfd 100644 --- a/hosts/k8s/lib.nix +++ b/hosts/k8s/lib.nix @@ -47,6 +47,17 @@ }; }; + # Workaround for longhorn running on NixOS + # https://github.com/longhorn/longhorn/issues/2166 + systemd.tmpfiles.rules = [ + "L+ /usr/local/bin - - - - /run/current-system/sw/bin/" + ]; + # Longhorn uses open-iscsi to create block devices. + services.openiscsi = { + name = "iqn.2020-08.org.linux-iscsi.initiatorhost:${hostName}"; + enable = true; + }; + networking = { inherit hostName; inherit (networking) defaultGateway nameservers;