From 82b8006bea6fba53dd90d6cc21c0d68ae9e597b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 15 Jul 2024 11:49:06 -0300 Subject: [PATCH 1/4] thunar: fix finding programs --- user/thunar.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/user/thunar.nix b/user/thunar.nix index 2a9fe5b..26b90e9 100644 --- a/user/thunar.nix +++ b/user/thunar.nix @@ -10,6 +10,12 @@ }) ]; + wayland.windowManager.sway = { + extraConfig = '' + exec_always systemctl --user import-environment PATH + ''; + }; + xdg.configFile = { "Thunar/".source = ./thunar; }; From 752f029bce075d605d22e1a0b40c016801467e13 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 15 Jul 2024 11:50:00 -0300 Subject: [PATCH 2/4] sway: disable vrr --- scripts/default.nix | 1 - scripts/vrr-fullscreen | 28 ---------------------------- user/sway/default.nix | 16 ---------------- 3 files changed, 45 deletions(-) delete mode 100755 scripts/vrr-fullscreen diff --git a/scripts/default.nix b/scripts/default.nix index 72f9cc6..01ce2b8 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -130,7 +130,6 @@ coreutils gnugrep ]; - vrr-fullscreen = [ ]; } // lib.mapAttrs import_script { wdmenu = ./wdmenu.nix; diff --git a/scripts/vrr-fullscreen b/scripts/vrr-fullscreen deleted file mode 100755 index 8413923..0000000 --- a/scripts/vrr-fullscreen +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env bash - -# List of supported outputs for VRR -output_vrr_whitelist=( - "DP-1" - "DP-2" -) - -# Toggle VRR for fullscreened apps in prespecified displays to avoid stutters while in desktop -swaymsg -t subscribe -m '[ "window" ]' | while read window_json; do - window_event=$(echo ${window_json} | jq -r '.change') - - # Process only focus change and fullscreen toggle - if [[ $window_event = "focus" || $window_event = "fullscreen_mode" ]]; then - output_json=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused == true)') - output_name=$(echo ${output_json} | jq -r '.name') - - # Use only VRR in whitelisted outputs - if [[ ${output_vrr_whitelist[*]} =~ ${output_name} ]]; then - output_vrr_status=$(echo ${output_json} | jq -r '.adaptive_sync_status') - window_fullscreen_status=$(echo ${window_json} | jq -r '.container.fullscreen_mode') - - # Only update output if nesseccary to avoid flickering - [[ $output_vrr_status = "disabled" && $window_fullscreen_status = "1" ]] && swaymsg output "${output_name}" adaptive_sync 1 - [[ $output_vrr_status = "enabled" && $window_fullscreen_status = "0" ]] && swaymsg output "${output_name}" adaptive_sync 0 - fi - fi -done diff --git a/user/sway/default.nix b/user/sway/default.nix index 3e86994..9fcf2a0 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -69,7 +69,6 @@ in }; output = { "*" = { - adaptive_sync = "off"; bg = "${theme.background} fill"; mode = "1920x1080@144.000Hz"; }; @@ -116,21 +115,6 @@ in indicator = true; }; - systemd.user.services.vrr-fullscreen = { - Unit = { - Description = "Enable VRR for fullscreen windows"; - PartOf = [ "graphical-session.target" ]; - After = [ "graphical-session.target" ]; - }; - Service = { - ExecStart = "${lib.getExe pkgs.vrr-fullscreen}"; - Restart = "on-failure"; - }; - Install = { - WantedBy = [ "sway-session.target" ]; - }; - }; - services.gpg-agent.pinentryPackage = pkgs.pinentry-all; xdg.configFile."OpenTabletDriver/settings.json".source = ./open-tablet-driver.json; From 1475ab2806f0b44bc8c4f64db45efd125e51307a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 15 Jul 2024 12:03:13 -0300 Subject: [PATCH 3/4] waybar: fix clock locale --- user/waybar/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/waybar/default.nix b/user/waybar/default.nix index d2dc661..c94edf5 100644 --- a/user/waybar/default.nix +++ b/user/waybar/default.nix @@ -106,7 +106,7 @@ in }; clock = { interval = 60; - format = "{:%H:%M %a %d/%m}"; + format = "{:L%H:%M %a %d/%m}"; tooltip-format = "{calendar}"; calendar = { mode = "year"; From b7d17a01730a65eadd42c75bfacdda668a1b6c23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Mon, 15 Jul 2024 12:50:49 -0300 Subject: [PATCH 4/4] invidious: fix conflic with forgejo port --- hosts/phantom/forgejo.nix | 3 --- hosts/phantom/invidious.nix | 10 +--------- hosts/phantom/nginx.nix | 1 + 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/hosts/phantom/forgejo.nix b/hosts/phantom/forgejo.nix index eefb003..cd95461 100644 --- a/hosts/phantom/forgejo.nix +++ b/hosts/phantom/forgejo.nix @@ -13,9 +13,6 @@ in virtualHosts.${cfg.settings.server.DOMAIN} = { forceSSL = true; enableACME = true; - extraConfig = '' - client_max_body_size 512M; - ''; locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}"; }; }; diff --git a/hosts/phantom/invidious.nix b/hosts/phantom/invidious.nix index 739d9ae..8c1e0f6 100644 --- a/hosts/phantom/invidious.nix +++ b/hosts/phantom/invidious.nix @@ -1,20 +1,12 @@ -{ config, ... }: { services.invidious = { enable = true; domain = "invidious.lelgenio.com"; nginx.enable = true; + port = 10601; settings.db = { user = "invidious"; dbname = "invidious"; }; }; - - services.nginx = { - clientMaxBodySize = "100m"; - virtualHosts.${config.services.invidious.domain} = { - enableACME = true; - forceSSL = true; - }; - }; } diff --git a/hosts/phantom/nginx.nix b/hosts/phantom/nginx.nix index 0153fa6..bfff32c 100644 --- a/hosts/phantom/nginx.nix +++ b/hosts/phantom/nginx.nix @@ -11,6 +11,7 @@ recommendedTlsSettings = true; recommendedOptimisation = true; recommendedGzipSettings = true; + clientMaxBodySize = "512M"; }; # Redirect *lelgenio.xyz -> *lelgenio.com