hm modules: gate behind enable options, always import

This commit is contained in:
müde 2026-05-03 15:19:06 +02:00
parent 6ee82131cd
commit c8cfa37bb9
8 changed files with 67 additions and 36 deletions

View file

@ -1,4 +1,12 @@
{ osConfig, thisDevice, ... }:
{ lib, config, osConfig, thisDevice, ... }:
{
services.tailscale-systray.enable = (thisDevice.isDesktop or false) && osConfig.my.tailscale.enable;
options.my.tailscale.enable = lib.mkOption {
type = lib.types.bool;
default = (thisDevice.isDesktop or false) && osConfig.my.tailscale.enable;
description = "Whether to enable the Tailscale system tray applet. Defaults to true on desktops with Tailscale enabled.";
};
config = lib.mkIf config.my.tailscale.enable {
services.tailscale-systray.enable = true;
};
}