feat(home-manager): Add platform compatibility guards to cross-platform roles
Add lib.optionals pkgs.stdenv.isLinux guards to roles that contain Linux-only packages or services to prevent build failures on Darwin: - communication: Guard Electron apps (element-desktop, fluffychat, nextcloud-talk-desktop) that don't build on Darwin due to electron build-from-source limitations - kdeconnect: Guard entire config block since services.kdeconnect requires D-Bus and systemd (Linux-only) - sync: Guard syncthingtray package (requires Linux system tray) - email: Guard systemd.user.services/timers (Darwin uses launchd) - desktop: Guard Linux-only packages, services, and KDE-specific configurations including gnome-keyring, systemd services, and XDG mime associations Implements bead: nixos-configs-tcu
This commit is contained in:
@@ -4,13 +4,15 @@ with lib;
|
||||
|
||||
let
|
||||
cfg = config.home.roles.kdeconnect;
|
||||
isLinux = pkgs.stdenv.isLinux;
|
||||
in
|
||||
{
|
||||
options.home.roles.kdeconnect = {
|
||||
enable = mkEnableOption "Enable KDE Connect for device integration";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# KDE Connect services are Linux-only (requires D-Bus and systemd)
|
||||
config = mkIf (cfg.enable && isLinux) {
|
||||
services.kdeconnect = {
|
||||
enable = true;
|
||||
indicator = true;
|
||||
|
||||
Reference in New Issue
Block a user