diff options
author | Jon Seager <jon@sgrs.uk> | 2023-07-03 17:57:08 +0100 |
---|---|---|
committer | Jon Seager <jon@sgrs.uk> | 2023-07-07 18:31:03 +0100 |
commit | 2fbb85e2c9286934e707fe3a6ef48e7b31047a4f (patch) | |
tree | cd3b879fe7302ab2358b9b9eede30697c8360df3 /nixos/modules/virtualisation/lxd.nix | |
parent | aecfcd8d4656cd2616fc3474c6e0578506d6f5c5 (diff) |
nixos/lxd: add ui.enable option to toggle ui feature
Diffstat (limited to 'nixos/modules/virtualisation/lxd.nix')
-rw-r--r-- | nixos/modules/virtualisation/lxd.nix | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nixos/modules/virtualisation/lxd.nix b/nixos/modules/virtualisation/lxd.nix index 738382ef41a5f..22e336c895f95 100644 --- a/nixos/modules/virtualisation/lxd.nix +++ b/nixos/modules/virtualisation/lxd.nix @@ -85,6 +85,14 @@ in { considered failed and systemd will attempt to restart it. ''; }; + + ui = { + enable = lib.mkEnableOption (lib.mdDoc '' + Enables the (experimental) LXD UI. + ''); + + package = mkPackageOption pkgs.lxd "ui" { }; + }; }; }; @@ -143,6 +151,10 @@ in { path = [ pkgs.util-linux ] ++ optional cfg.zfsSupport config.boot.zfs.package; + environment = mkIf (cfg.ui.enable) { + "LXD_UI" = cfg.ui.package; + }; + serviceConfig = { ExecStart = "@${cfg.package}/bin/lxd lxd --group lxd"; ExecStartPost = "${cfg.package}/bin/lxd waitready --timeout=${cfg.startTimeout}"; |