From 7b32e2db1ee15113af552510495fb2891ff947b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Tue, 4 Aug 2026 20:40:47 -0300 Subject: [PATCH 1/4] gitlab: add gitlab-artifact-cleanup --- pkgs/default.nix | 1 + pkgs/gitlab-artifact-cleanup.nix | 65 ++++++++++++++++++++++++++++++++ user/git.nix | 2 + 3 files changed, 68 insertions(+) create mode 100644 pkgs/gitlab-artifact-cleanup.nix diff --git a/pkgs/default.nix b/pkgs/default.nix index 415e419..83f4b1f 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -13,6 +13,7 @@ rec { emmet-cli = pkgs.callPackage ./emmet-cli.nix { }; material-wifi-icons = pkgs.callPackage ./material-wifi-icons.nix { }; gnome-pass-search-provider = pkgs.callPackage ./gnome-pass-search-provider.nix { }; + gitlab-artifact-cleanup = pkgs.callPackage ./gitlab-artifact-cleanup.nix { }; my-factorio-headless = pkgs.callPackage ./factorio-headless { inherit (pkgs.unstable) factorio-headless; }; diff --git a/pkgs/gitlab-artifact-cleanup.nix b/pkgs/gitlab-artifact-cleanup.nix new file mode 100644 index 0000000..3845625 --- /dev/null +++ b/pkgs/gitlab-artifact-cleanup.nix @@ -0,0 +1,65 @@ +{ + lib, + python3Packages, + fetchFromGitHub, +}: + +let + yacl = python3Packages.buildPythonPackage rec { + pname = "yacl"; + version = "0.6.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "IngoMeyer441"; + repo = "yacl"; + rev = "v${version}"; + hash = "sha256-W62amvrH8RdWpBhfmj+iVyekuDhr74ueIOzRw6GO2i8="; + }; + + build-system = with python3Packages; [ setuptools ]; + + optional-dependencies = { + colored_exceptions = with python3Packages; [ pygments ]; + }; + + pythonImportsCheck = [ "yacl" ]; + + meta = { + description = "Yet Another Color Logger for Python programs"; + homepage = "https://github.com/IngoMeyer441/yacl"; + license = lib.licenses.mit; + }; + }; +in +python3Packages.buildPythonApplication rec { + pname = "gitlab-artifact-cleanup"; + version = "0.1.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "sciapp"; + repo = "gitlab-artifact-cleanup"; + rev = "v${version}"; + hash = "sha256-xjJyP1z7bAGjTYxFYByeFbFXu/R8908K8upH5fRZnTs="; + }; + + build-system = with python3Packages; [ setuptools ]; + + dependencies = + with python3Packages; + [ + python-gitlab + yacl + ] + ++ yacl.optional-dependencies.colored_exceptions; + + pythonImportsCheck = [ "gitlab_artifact_cleanup" ]; + + meta = { + description = "Tool for cleaning up old GitLab CI/CD job artifacts"; + homepage = "https://github.com/sciapp/gitlab-artifact-cleanup"; + license = lib.licenses.mit; + mainProgram = "gitlab-artifact-cleanup"; + }; +} diff --git a/user/git.nix b/user/git.nix index 8d10eed..fd50475 100644 --- a/user/git.nix +++ b/user/git.nix @@ -73,6 +73,8 @@ in gh glab + + gitlab-artifact-cleanup ]; }; } From 49853095526794d0fb4d611ec610ce2bc94ac9d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 14 Aug 2026 21:30:23 -0300 Subject: [PATCH 2/4] kde: force dolphin as file manager --- system/kde.nix | 15 +++++++++++++++ user/kde.nix | 5 +++++ 2 files changed, 20 insertions(+) diff --git a/system/kde.nix b/system/kde.nix index fa529d0..bed6580 100644 --- a/system/kde.nix +++ b/system/kde.nix @@ -22,5 +22,20 @@ kdePackages.partitionmanager kdePackages.sddm-kcm ]; + + xdg.portal = { + enable = true; + extraPortals = [ pkgs.kdePackages.xdg-desktop-portal-kde ]; + config = { + common = { + default = [ "kde" ]; + }; + }; + }; + + environment.sessionVariables = { + GTK_USE_PORTAL = "1"; + GDK_DEBUG = "portals"; + }; }; } diff --git a/user/kde.nix b/user/kde.nix index 6a19816..cd80989 100644 --- a/user/kde.nix +++ b/user/kde.nix @@ -9,4 +9,9 @@ } // lib.mkIf (config.my.desktop == "kde") { services.gpg-agent.pinentry.package = lib.mkForce pkgs.pinentry-qt; + + # Some programs like Firefox and vscode don't use xdg-open, and instead use org.freedesktop.FileManager1. + # This forces Dolphin to be the provider for that. + xdg.dataFile."dbus-1/services/org.freedesktop.FileManager1.service".source = + "${pkgs.kdePackages.dolphin}/share/dbus-1/services/org.kde.dolphin.FileManager1.service"; } From 7e1e8b59e4bd6e27b6244af41f24f12452acfa7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 14 Aug 2026 23:44:28 -0300 Subject: [PATCH 3/4] Revert "remove fullscreen only vrr" This reverts commit 1fcf1ecd5239783497f0d273a3904a16cf7aa15f. --- scripts/default.nix | 1 + scripts/vrr-fullscreen | 29 +++++++++++++++++++++++++++++ user/sway/default.nix | 15 +++++++++++++++ 3 files changed, 45 insertions(+) create mode 100755 scripts/vrr-fullscreen diff --git a/scripts/default.nix b/scripts/default.nix index 39fe853..b44b40a 100644 --- a/scripts/default.nix +++ b/scripts/default.nix @@ -159,6 +159,7 @@ print-battery-icon = [ ]; controller-battery = [ print-battery-icon ]; mouse-battery = [ print-battery-icon ]; + vrr-fullscreen = [ ]; nix-prefetch-firefox-extension = [ nix ]; diff --git a/scripts/vrr-fullscreen b/scripts/vrr-fullscreen new file mode 100755 index 0000000..faca977 --- /dev/null +++ b/scripts/vrr-fullscreen @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +# List of supported outputs for VRR +output_vrr_whitelist=( + "DP-1" + "DP-2" + "DP-3" +) + +# 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 c7b81f5..f2ab0bd 100644 --- a/user/sway/default.nix +++ b/user/sway/default.nix @@ -138,6 +138,21 @@ in services.gpg-agent.pinentry.package = pkgs.pinentry-all; + 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" ]; + }; + }; + xdg.configFile."OpenTabletDriver/settings.json" = { force = true; source = ./open-tablet-driver.json; From 6f7d0af4eb1a128065992579d35a75a8c5e5262c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leonardo=20Eug=C3=AAnio?= Date: Fri, 14 Aug 2026 23:45:16 -0300 Subject: [PATCH 4/4] sway: fix xdg portal screen chooser --- system/greetd.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/system/greetd.nix b/system/greetd.nix index 606d518..230f654 100644 --- a/system/greetd.nix +++ b/system/greetd.nix @@ -39,7 +39,13 @@ in programs.wshowkeys.enable = true; xdg.portal = { enable = true; - wlr.enable = true; + wlr = { + enable = true; + settings.screencast = { + chooser_type = "dmenu"; + chooser_cmd = lib.getExe pkgs.bmenu; + }; + }; # gtk portal needed to make gtk apps happy extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; };