xin/gui/kde.nix
2024-03-12 11:19:09 -06:00

35 lines
767 B
Nix

{ config
, lib
, isUnstable
, ...
}:
{
options = { kde = { enable = lib.mkEnableOption "Enable KDE desktop."; }; };
config = lib.mkIf config.kde.enable {
services.xserver =
lib.mkMerge [
(if isUnstable then {
desktopManager.plasma6.enable = true;
displayManager.sddm.wayland.enable = true;
}
else {
desktopManager.plasma5.enable = true;
})
{
displayManager.sddm.enable = true;
}
];
# Listen for KDE Connect connections on the tailnet
networking.firewall.interfaces = {
"tailscale0" = {
allowedTCPPorts = lib.range 1714 1764;
allowedUDPPorts = lib.range 1714 1764;
};
};
programs.kdeconnect.enable = true;
};
}