Add display scaling option for GDK applications

This commit is contained in:
Joshua Yuen 2026-09-11 22:35:32 -04:00
parent 0dc7671926
commit 2937154e38
Signed by: josh
GPG Key ID: 530DA0331EFE99F5
5 changed files with 19 additions and 0 deletions

View File

@ -16,4 +16,5 @@
modules.gpg.signingKey = "0x530DA0331EFE99F5";
modules.gnomeBoxes.enable = true;
modules.display.scale = 2;
}

View File

@ -28,6 +28,7 @@ in
users.${username} = {
imports = [ ../../homes/${username}/home.nix ];
modules.gpg.signingKey = config.modules.gpg.signingKey;
modules.display.scale = config.modules.display.scale;
};
};

View File

@ -7,6 +7,7 @@
with lib;
let
cfg = config.modules.hyprland;
displayCfg = config.modules.display;
in
{
wayland.windowManager.hyprland = {
@ -56,6 +57,7 @@ in
"XDG_CURRENT_DESKTOP, Hyprland"
"XDG_SESSION_DESKTOP, Hyprland"
"XDG_SESSION_TYPE, wayland"
"GDK_SCALE, ${toString displayCfg.scale}"
];
xwayland = {

View File

@ -4,6 +4,7 @@
{
imports = [
./discord.nix
./display.nix
./displayManager.nix
./gnomeBoxes.nix
./gpg.nix

View File

@ -0,0 +1,14 @@
{
lib,
...
}:
with lib;
{
options.modules.display = {
scale = mkOption {
type = types.int;
default = 1;
description = "Display Scaling";
};
};
}