fix(nixos): make Firefox scale host-specific
This commit is contained in:
@@ -46,6 +46,7 @@
|
||||
modules.shell.pi.enable = true;
|
||||
|
||||
modules.desktop.enable = true;
|
||||
modules.desktop.apps.firefox.uiScale = "1.25";
|
||||
modules.desktop.apps.obsidian.enable = true;
|
||||
modules.desktop.apps.steam.enable = true;
|
||||
|
||||
|
||||
@@ -12,7 +12,19 @@ let
|
||||
firefoxAddons = inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system};
|
||||
in
|
||||
{
|
||||
options.modules.desktop.apps.firefox.enable = lib.mkEnableOption "Firefox as the desktop browser";
|
||||
options.modules.desktop.apps.firefox = {
|
||||
enable = lib.mkEnableOption "Firefox as the desktop browser";
|
||||
|
||||
uiScale = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "1.0";
|
||||
description = ''
|
||||
Firefox UI and page scale, passed to `layout.css.devPixelsPerPx`.
|
||||
Override it on hosts that need a larger browser scale, such as small
|
||||
high-DPI laptop panels.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home-manager.users.${user} = hm: {
|
||||
@@ -70,7 +82,7 @@ in
|
||||
# whole chrome while point-sized apps stay put.
|
||||
# A shade under that brings it into line without dropping to true
|
||||
# 1:1, which reads too small at this DPI.
|
||||
"layout.css.devPixelsPerPx" = "1.25";
|
||||
"layout.css.devPixelsPerPx" = cfg.uiScale;
|
||||
|
||||
# Auto-enable the sideloaded Firefox Color add-on carrying the Nord
|
||||
# chrome theme, which Firefox otherwise leaves disabled.
|
||||
|
||||
Reference in New Issue
Block a user