From bf132b32b4493c9301c7539f9db4d38ac7260770 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Tue, 22 Aug 2023 12:32:05 -0600 Subject: [PATCH] [NixOS] Enable picom vsync for machines other than ryzen-shine --- nixos/machines/ryzen-shine.nix | 2 ++ nixos/options.nix | 8 ++++++++ nixos/xmonad.nix | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 nixos/options.nix diff --git a/nixos/machines/ryzen-shine.nix b/nixos/machines/ryzen-shine.nix index eb4eefed..67e44c65 100644 --- a/nixos/machines/ryzen-shine.nix +++ b/nixos/machines/ryzen-shine.nix @@ -6,6 +6,8 @@ ]; features.full.enable = true; + # Needed for now because monitors have different refresh rates + modules.xmonad.picom.vSync.enable = false; boot.loader.systemd-boot.configurationLimit = 5; diff --git a/nixos/options.nix b/nixos/options.nix new file mode 100644 index 00000000..0dfbdf4e --- /dev/null +++ b/nixos/options.nix @@ -0,0 +1,8 @@ +{ lib, ... }: { + options = { + modules.xmonad.picom.vSync.enable = lib.makeOption { + default = true; + type = lib.types.bool; + }; + }; +} diff --git a/nixos/xmonad.nix b/nixos/xmonad.nix index 99f1e965..327628d1 100644 --- a/nixos/xmonad.nix +++ b/nixos/xmonad.nix @@ -83,7 +83,7 @@ makeEnable config "modules.xmonad" true { services.picom = { enable = true; - vSync = false; + vSync = config.modules.xmonad.picom.vSync.enable; backend = "glx"; extraArgs = ["--experimental-backends"];