diff options
author | Maciej Krüger <mkg20001@gmail.com> | 2024-02-16 13:59:23 +0100 |
---|---|---|
committer | Maciej Krüger <mkg20001@gmail.com> | 2024-02-17 16:49:32 +0100 |
commit | a6e237a86a4703e7c19e99357d781e3cabf288aa (patch) | |
tree | fdc3a3011484ee3296fd8b5d4ed10783e0cc3e3a /nixos/modules/virtualisation | |
parent | d2cdf187c70ed061d4ad3e77a0a86254c6701886 (diff) |
modules/incus: add ui flag
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r-- | nixos/modules/virtualisation/incus.nix | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/nixos/modules/virtualisation/incus.nix b/nixos/modules/virtualisation/incus.nix index bbe5b48b95bb1..3bbe0ba458516 100644 --- a/nixos/modules/virtualisation/incus.nix +++ b/nixos/modules/virtualisation/incus.nix @@ -97,6 +97,12 @@ in considered failed and systemd will attempt to restart it. ''; }; + + ui = { + enable = lib.mkEnableOption (lib.mdDoc "(experimental) Incus UI"); + + package = lib.mkPackageOption pkgs [ "incus" "ui" ] { }; + }; }; }; @@ -165,10 +171,12 @@ in "${config.boot.zfs.package}/lib/udev" ]; - environment = { + environment = lib.mkMerge [ { # Override Path to the LXC template configuration directory INCUS_LXC_TEMPLATE_CONFIG = "${pkgs.lxcfs}/share/lxc/config"; - }; + } (lib.mkIf (cfg.ui.enable) { + "INCUS_UI" = cfg.ui.package; + }) ]; serviceConfig = { ExecStart = "${cfg.package}/bin/incusd --group incus-admin"; |