Compare commits
No commits in common. "b7d17a01730a65eadd42c75bfacdda668a1b6c23" and "77d82ba3395868d3013ad44c6702eac83397c1ba" have entirely different histories.
b7d17a0173
...
77d82ba339
|
@ -13,6 +13,9 @@ in
|
||||||
virtualHosts.${cfg.settings.server.DOMAIN} = {
|
virtualHosts.${cfg.settings.server.DOMAIN} = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
|
extraConfig = ''
|
||||||
|
client_max_body_size 512M;
|
||||||
|
'';
|
||||||
locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}";
|
locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,12 +1,20 @@
|
||||||
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
services.invidious = {
|
services.invidious = {
|
||||||
enable = true;
|
enable = true;
|
||||||
domain = "invidious.lelgenio.com";
|
domain = "invidious.lelgenio.com";
|
||||||
nginx.enable = true;
|
nginx.enable = true;
|
||||||
port = 10601;
|
|
||||||
settings.db = {
|
settings.db = {
|
||||||
user = "invidious";
|
user = "invidious";
|
||||||
dbname = "invidious";
|
dbname = "invidious";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.nginx = {
|
||||||
|
clientMaxBodySize = "100m";
|
||||||
|
virtualHosts.${config.services.invidious.domain} = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,6 @@
|
||||||
recommendedTlsSettings = true;
|
recommendedTlsSettings = true;
|
||||||
recommendedOptimisation = true;
|
recommendedOptimisation = true;
|
||||||
recommendedGzipSettings = true;
|
recommendedGzipSettings = true;
|
||||||
clientMaxBodySize = "512M";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Redirect *lelgenio.xyz -> *lelgenio.com
|
# Redirect *lelgenio.xyz -> *lelgenio.com
|
||||||
|
|
|
@ -130,6 +130,7 @@
|
||||||
coreutils
|
coreutils
|
||||||
gnugrep
|
gnugrep
|
||||||
];
|
];
|
||||||
|
vrr-fullscreen = [ ];
|
||||||
}
|
}
|
||||||
// lib.mapAttrs import_script {
|
// lib.mapAttrs import_script {
|
||||||
wdmenu = ./wdmenu.nix;
|
wdmenu = ./wdmenu.nix;
|
||||||
|
|
28
scripts/vrr-fullscreen
Executable file
28
scripts/vrr-fullscreen
Executable file
|
@ -0,0 +1,28 @@
|
||||||
|
#!/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
|
|
@ -69,6 +69,7 @@ in
|
||||||
};
|
};
|
||||||
output = {
|
output = {
|
||||||
"*" = {
|
"*" = {
|
||||||
|
adaptive_sync = "off";
|
||||||
bg = "${theme.background} fill";
|
bg = "${theme.background} fill";
|
||||||
mode = "1920x1080@144.000Hz";
|
mode = "1920x1080@144.000Hz";
|
||||||
};
|
};
|
||||||
|
@ -115,6 +116,21 @@ in
|
||||||
indicator = true;
|
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;
|
services.gpg-agent.pinentryPackage = pkgs.pinentry-all;
|
||||||
|
|
||||||
xdg.configFile."OpenTabletDriver/settings.json".source = ./open-tablet-driver.json;
|
xdg.configFile."OpenTabletDriver/settings.json".source = ./open-tablet-driver.json;
|
||||||
|
|
|
@ -10,12 +10,6 @@
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
wayland.windowManager.sway = {
|
|
||||||
extraConfig = ''
|
|
||||||
exec_always systemctl --user import-environment PATH
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"Thunar/".source = ./thunar;
|
"Thunar/".source = ./thunar;
|
||||||
};
|
};
|
||||||
|
|
|
@ -106,7 +106,7 @@ in
|
||||||
};
|
};
|
||||||
clock = {
|
clock = {
|
||||||
interval = 60;
|
interval = 60;
|
||||||
format = "<b>{:L%H:%M %a %d/%m}</b>";
|
format = "<b>{:%H:%M %a %d/%m}</b>";
|
||||||
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
||||||
calendar = {
|
calendar = {
|
||||||
mode = "year";
|
mode = "year";
|
||||||
|
|
Loading…
Reference in a new issue