From 758e2c79a372b3c2f5ecbb1e6967af6481bac7cf Mon Sep 17 00:00:00 2001 From: cspark Date: Tue, 13 Aug 2024 20:06:18 +0100 Subject: [PATCH] Add distrobox to global packages, setup firewall rules for kdeconnect, autostart kdeconnect indicator on niri start --- global-home.nix | 1 + global.nix | 17 +++++++++++++---- modules/nixos/cspark-desktop-niri/home.nix | 1 + .../nixos/cspark-single-gpu-passthru/module.nix | 2 +- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/global-home.nix b/global-home.nix index 0f50dbad..124f0ea8 100644 --- a/global-home.nix +++ b/global-home.nix @@ -93,6 +93,7 @@ fi unityhub veracrypt boxbuddy + distrobox qdirstat kid3 ffmpeg diff --git a/global.nix b/global.nix index ef9b6f82..6f43af46 100644 --- a/global.nix +++ b/global.nix @@ -257,10 +257,19 @@ # Open ports in the firewall. # 3240 - USBIP Port - networking.firewall.allowedTCPPorts = [ 3240 ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - networking.firewall.enable = true; + # 1714 to 1764 - KDEConnect + networking.firewall = { + allowedTCPPorts = [ 3240 ]; + allowedTCPPortRanges = [ + { from = 1714; to = 1764; } + ]; + # allowedUDPPorts = [ ... ]; + allowedUDPPortRanges = [ + { from = 1714; to = 1764; } + ]; + # Or disable the firewall altogether. + enable = true; + }; services.udev.extraRules = '' ## Rules file for NetMD devices and HiMD devices in NetMD mode diff --git a/modules/nixos/cspark-desktop-niri/home.nix b/modules/nixos/cspark-desktop-niri/home.nix index 83b1d270..f1612c92 100644 --- a/modules/nixos/cspark-desktop-niri/home.nix +++ b/modules/nixos/cspark-desktop-niri/home.nix @@ -36,6 +36,7 @@ in mako & swaybg -i ${config.home.homeDirectory}/Pictures/Wallpapers/ourdream.png & wlsunset -l 51.5 -L 0.1 & + kdeconnect-indicator & # Xwayland support via xwayland-satellite-flake export DISPLAY=":0" diff --git a/modules/nixos/cspark-single-gpu-passthru/module.nix b/modules/nixos/cspark-single-gpu-passthru/module.nix index 61a9673e..acb9a1ae 100644 --- a/modules/nixos/cspark-single-gpu-passthru/module.nix +++ b/modules/nixos/cspark-single-gpu-passthru/module.nix @@ -106,7 +106,7 @@ in }; script = ''echo device_specific > "/sys/bus/pci/devices/${cfg.gpuPCI}/reset_method"''; }; - hardware.opengl.enable = true; + hardware.graphics.enable = true; virtualisation.spiceUSBRedirection.enable = true; }; }