From 25a3a7e2376c305819c31747a041941205a6768a Mon Sep 17 00:00:00 2001 From: Jimbo Date: Tue, 15 Oct 2024 17:10:40 -0400 Subject: [PATCH] More small changes to formatting and such --- modules/home/programs/gui/foot/default.nix | 2 +- modules/home/settings/gtk/default.nix | 2 +- modules/home/sway/waybar/default.nix | 2 +- .../system/desktop/sway/greetd/default.nix | 36 +++++++++---------- .../networking/firewall/server/default.nix | 3 +- modules/system/devices/pipewire/default.nix | 8 ++--- 6 files changed, 25 insertions(+), 28 deletions(-) diff --git a/modules/home/programs/gui/foot/default.nix b/modules/home/programs/gui/foot/default.nix index 9524205..13d396e 100644 --- a/modules/home/programs/gui/foot/default.nix +++ b/modules/home/programs/gui/foot/default.nix @@ -12,7 +12,7 @@ style = "beam"; }; colors = { - alpha = "0.65"; + alpha = "0.85"; background = "${config.look.colors.dark}"; regular0 = "3f3f3f"; regular1 = "cc0000"; diff --git a/modules/home/settings/gtk/default.nix b/modules/home/settings/gtk/default.nix index 868ff0a..4c9b04b 100644 --- a/modules/home/settings/gtk/default.nix +++ b/modules/home/settings/gtk/default.nix @@ -16,7 +16,7 @@ }; }; iconTheme = { - package = pkgs.papirus-icon-theme.override { color = "indigo"; }; + package = pkgs.papirus-icon-theme.override { color = "red"; }; name = "Papirus-Dark"; }; cursorTheme = { diff --git a/modules/home/sway/waybar/default.nix b/modules/home/sway/waybar/default.nix index c7d2276..c3e0629 100644 --- a/modules/home/sway/waybar/default.nix +++ b/modules/home/sway/waybar/default.nix @@ -11,7 +11,7 @@ swayWindowsModule = { icon = true; icon-size = 15; - all-config = true; + all-outputs = true; tooltip = false; rewrite = { "(.*) — LibreWolf" = " $1"; diff --git a/modules/system/desktop/sway/greetd/default.nix b/modules/system/desktop/sway/greetd/default.nix index 296a1dc..a1a56e1 100644 --- a/modules/system/desktop/sway/greetd/default.nix +++ b/modules/system/desktop/sway/greetd/default.nix @@ -2,24 +2,7 @@ { services = { # Configure greetd for "auto" login (single user only) - greetd = let - startSway = pkgs.writeScript "startsway" '' - # Use NVIDIA variables if drivers are in use - if lspci -k | grep "Kernel driver in use: nvidia" &> /dev/null; then - export LIBVA_DRIVER_NAME=nvidia - export GBM_BACKEND=nvidia-drm - export __GLX_VENDOR_LIBRARY_NAME=nvidia - export WLR_NO_HARDWARE_CURSORS=1 - else - : - fi - - export XDG_CURRENT_DESKTOP=sway - export QT_QPA_PLATFORM="wayland;xcb" - - sway --unsupported-gpu - ''; - in { + greetd = { enable = true; restart = true; settings = { @@ -28,7 +11,22 @@ switch = true; }; default_session = { - command = "${startSway}"; + command = '' + if lspci -k | grep "Kernel driver in use: nvidia" &> /dev/null; then + export LIBVA_DRIVER_NAME=nvidia + export GBM_BACKEND=nvidia-drm + export __GLX_VENDOR_LIBRARY_NAME=nvidia + export WLR_NO_HARDWARE_CURSORS=1 + else + : + fi + + export WLR_RENDERER=vulkan + export XDG_CURRENT_DESKTOP=sway + export QT_QPA_PLATFORM="wayland;xcb" + + sway --unsupported-gpu + ''; user = "jimbo"; }; }; diff --git a/modules/system/devices/networking/firewall/server/default.nix b/modules/system/devices/networking/firewall/server/default.nix index 9e3e162..1d351e4 100644 --- a/modules/system/devices/networking/firewall/server/default.nix +++ b/modules/system/devices/networking/firewall/server/default.nix @@ -9,8 +9,6 @@ in { firewall = { allowPing = false; - - # Add extra input rules using nftables extraInputRules = '' ip saddr { ${outputs.ips.localSpan}.0/24, ${outputs.ips.wgSpan}.0/24 } tcp dport 2049 accept comment "Accept NFS" ip saddr { ${outputs.ips.pc}, ${outputs.secrets.lunaIP}, ${outputs.secrets.cornIP} } tcp dport { 1935, 1945 } accept comment "Accept RTMP" @@ -42,6 +40,7 @@ ip saddr ${outputs.secrets.cornIP} tcp dport { 9943, 9944 } dnat to ${outputs.ips.vm} comment "VM ALVR TCP" ip saddr ${outputs.secrets.cornIP} udp dport { 9943, 9944 } dnat to ${outputs.ips.vm} comment "VM ALVR UDP" } + chain POSTROUTING { type nat hook postrouting priority 100; policy accept; oifname "${outputs.ips.netInt}" masquerade diff --git a/modules/system/devices/pipewire/default.nix b/modules/system/devices/pipewire/default.nix index 35430c3..2b2a50d 100644 --- a/modules/system/devices/pipewire/default.nix +++ b/modules/system/devices/pipewire/default.nix @@ -6,11 +6,11 @@ audio.enable = true; wireplumber = { enable = true; - configPackages = [ - (pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/11-bluetooth-policy.conf" '' + configPackages = [( + pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/11-bluetooth-policy.conf" '' wireplumber.settings = { bluetooth.autoswitch-to-headset-profile = false } - '') - ]; + '' + )]; }; alsa = { enable = true;