nixos/incus: add storage.truenas.enable option (#527154)

This commit is contained in:
Adam C. Stephens
2026-07-04 17:14:33 +00:00
committed by GitHub
+12
View File
@@ -93,6 +93,9 @@ let
]
++ lib.optionals nvidiaEnabled [
libnvidia-container
]
++ lib.optionals cfg.storage.truenas.enable [
truenas-incus-ctl
];
# https://github.com/lxc/incus/blob/cff35a29ee3d7a2af1f937cbb6cf23776941854b/internal/server/instance/drivers/driver_qemu.go#L123
@@ -284,6 +287,8 @@ in
'';
};
storage.truenas.enable = lib.mkEnableOption "TrueNAS storage driver support";
ui = {
enable = lib.mkEnableOption "Incus Web UI";
@@ -314,6 +319,10 @@ in
);
message = "Incus on NixOS is unsupported using iptables. Set `networking.nftables.enable = true;`";
}
{
assertion = cfg.storage.truenas.enable -> config.services.openiscsi.enable;
messages = "`virtualisation.incus.storage.truenas.enable` requires `services.openiscsi.enable`";
}
];
# https://github.com/lxc/incus/blob/f145309929f849b9951658ad2ba3b8f10cbe69d1/doc/reference/server_settings.md
@@ -346,6 +355,9 @@ in
# gui console support
pkgs.spice-gtk
]
++ lib.optionals cfg.storage.truenas.enable [
pkgs.truenas-incus-ctl
];
# Note: the following options are also declared in virtualisation.lxc, but