Compare commits
4 commits
29ce7579a5
...
6f7d0af4eb
| Author | SHA1 | Date | |
|---|---|---|---|
| 6f7d0af4eb | |||
| 7e1e8b59e4 | |||
| 4985309552 | |||
| 7b32e2db1e |
9 changed files with 140 additions and 1 deletions
|
|
@ -13,6 +13,7 @@ rec {
|
||||||
emmet-cli = pkgs.callPackage ./emmet-cli.nix { };
|
emmet-cli = pkgs.callPackage ./emmet-cli.nix { };
|
||||||
material-wifi-icons = pkgs.callPackage ./material-wifi-icons.nix { };
|
material-wifi-icons = pkgs.callPackage ./material-wifi-icons.nix { };
|
||||||
gnome-pass-search-provider = pkgs.callPackage ./gnome-pass-search-provider.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 {
|
my-factorio-headless = pkgs.callPackage ./factorio-headless {
|
||||||
inherit (pkgs.unstable) factorio-headless;
|
inherit (pkgs.unstable) factorio-headless;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
65
pkgs/gitlab-artifact-cleanup.nix
Normal file
65
pkgs/gitlab-artifact-cleanup.nix
Normal file
|
|
@ -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";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -159,6 +159,7 @@
|
||||||
print-battery-icon = [ ];
|
print-battery-icon = [ ];
|
||||||
controller-battery = [ print-battery-icon ];
|
controller-battery = [ print-battery-icon ];
|
||||||
mouse-battery = [ print-battery-icon ];
|
mouse-battery = [ print-battery-icon ];
|
||||||
|
vrr-fullscreen = [ ];
|
||||||
nix-prefetch-firefox-extension = [
|
nix-prefetch-firefox-extension = [
|
||||||
nix
|
nix
|
||||||
];
|
];
|
||||||
|
|
|
||||||
29
scripts/vrr-fullscreen
Executable file
29
scripts/vrr-fullscreen
Executable file
|
|
@ -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
|
||||||
|
|
@ -39,7 +39,13 @@ in
|
||||||
programs.wshowkeys.enable = true;
|
programs.wshowkeys.enable = true;
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
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
|
# gtk portal needed to make gtk apps happy
|
||||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -22,5 +22,20 @@
|
||||||
kdePackages.partitionmanager
|
kdePackages.partitionmanager
|
||||||
kdePackages.sddm-kcm
|
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";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,8 @@ in
|
||||||
|
|
||||||
gh
|
gh
|
||||||
glab
|
glab
|
||||||
|
|
||||||
|
gitlab-artifact-cleanup
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,4 +9,9 @@
|
||||||
}
|
}
|
||||||
// lib.mkIf (config.my.desktop == "kde") {
|
// lib.mkIf (config.my.desktop == "kde") {
|
||||||
services.gpg-agent.pinentry.package = lib.mkForce pkgs.pinentry-qt;
|
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";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -138,6 +138,21 @@ in
|
||||||
|
|
||||||
services.gpg-agent.pinentry.package = pkgs.pinentry-all;
|
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" = {
|
xdg.configFile."OpenTabletDriver/settings.json" = {
|
||||||
force = true;
|
force = true;
|
||||||
source = ./open-tablet-driver.json;
|
source = ./open-tablet-driver.json;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue