feat: added display scaling for eve
This commit is contained in:
parent
76d3c488db
commit
32c7086394
2 changed files with 43 additions and 6 deletions
|
@ -1,12 +1,30 @@
|
|||
{pkgs, ...}: {
|
||||
{
|
||||
pkgs,
|
||||
osConfig,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
config = {
|
||||
gnome = lib.mkMerge [
|
||||
{
|
||||
colorScheme = "prefer-dark";
|
||||
accentColor = "slate";
|
||||
extraWindowControls = true;
|
||||
extensions = [
|
||||
pkgs.gnomeExtensions.dash-to-panel
|
||||
];
|
||||
}
|
||||
|
||||
(lib.mkIf (osConfig.networking.hostName == "horizon") {
|
||||
displayScaling = 125;
|
||||
experimentalFeatures = {
|
||||
scaleMonitorFramebuffer = true;
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
dconf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"org/gnome/shell".enabled-extensions = [
|
||||
pkgs.gnomeExtensions.dash-to-panel.extensionUuid
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -60,6 +60,20 @@
|
|||
}));
|
||||
default = {};
|
||||
};
|
||||
displayScaling = lib.mkOption {
|
||||
type = lib.types.nullOr (lib.types.enum [100 125 150 175 200]);
|
||||
default = null;
|
||||
description = "Display scaling percentage for GNOME";
|
||||
};
|
||||
experimentalFeatures = lib.mkOption {
|
||||
type = lib.types.submodule {
|
||||
options = {
|
||||
scaleMonitorFramebuffer = lib.mkEnableOption "scale-monitor-framebuffer experimental feature";
|
||||
};
|
||||
};
|
||||
default = {};
|
||||
description = "GNOME experimental features to enable";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
|
@ -77,6 +91,11 @@
|
|||
"org/gnome/desktop/interface".color-scheme = config.gnome.colorScheme;
|
||||
"org/gnome/desktop/interface".accent-color = config.gnome.accentColor;
|
||||
"org/gnome/desktop/interface".clock-format = config.gnome.clockFormat;
|
||||
"org/gnome/desktop/interface".text-scaling-factor = lib.mkIf (config.gnome.displayScaling != null) (config.gnome.displayScaling / 100.0);
|
||||
|
||||
"org/gnome/mutter".experimental-features = lib.mkIf (builtins.any (x: x) (builtins.attrValues config.gnome.experimentalFeatures)) (
|
||||
lib.optional config.gnome.experimentalFeatures.scaleMonitorFramebuffer "scale-monitor-framebuffer"
|
||||
);
|
||||
}
|
||||
(
|
||||
lib.mkMerge (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue