From 15dcb4f3eee0d52c6f8f0d62e01a32007631e489 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 7 Nov 2022 20:48:07 -0500 Subject: Fix size issue on laptop by setting dpi The other changes served to set fontSize centrally, and adjust it for urxvt which doesn't behave for some reason. --- lib/common.nix | 8 ++++---- lib/const.nix | 5 +++++ lib/linux.nix | 4 +--- machines/helium.nix | 5 ----- profiles/laptop.nix | 1 + 5 files changed, 11 insertions(+), 12 deletions(-) create mode 100644 lib/const.nix diff --git a/lib/common.nix b/lib/common.nix index b5f31dc..8b40f60 100644 --- a/lib/common.nix +++ b/lib/common.nix @@ -1,10 +1,8 @@ { pkgs, lib, ... }: let - fontSize = 12; + inherit (import ./const.nix) fontSize homedir gpgid; locale = "en_US.UTF-8"; - gpgid = "66A6AD150399D970DCA4C4E6C8218B7D0BFDECCD"; - homedir = builtins.getEnv "HOME"; in { nixpkgs.overlays = [ (import ../overlay.nix) ]; home = { @@ -228,7 +226,9 @@ in { urxvt = let font = size: "xft:Fira Mono:size=${toString size}:ant"; in { enable = true; fonts = [ - (font fontSize) + # for some reason, urxvt font size is much larger than every other + # program's, so i gotta cut it in half + (font (fontSize / 2)) "xft:Noto Emoji" ]; keybindings = { diff --git a/lib/const.nix b/lib/const.nix new file mode 100644 index 0000000..0accd17 --- /dev/null +++ b/lib/const.nix @@ -0,0 +1,5 @@ +{ + fontSize = 16; + homedir = builtins.getEnv "HOME"; + gpgid = "66A6AD150399D970DCA4C4E6C8218B7D0BFDECCD"; +} diff --git a/lib/linux.nix b/lib/linux.nix index a90b7fb..fd0f887 100644 --- a/lib/linux.nix +++ b/lib/linux.nix @@ -1,10 +1,8 @@ { pkgs, lib, ... }: let - fontSize = 12; - homedir = builtins.getEnv "HOME"; + inherit (import ./const.nix) fontSize homedir gpgid; hostname = lib.strings.removeSuffix "\n" (builtins.readFile /etc/hostname); - gpgid = "66A6AD150399D970DCA4C4E6C8218B7D0BFDECCD"; base16-scheme = "atelier-sulphurpool"; base16-scheme-filename = lib.strings.concatStrings (lib.strings.splitString "-" base16-scheme); theme = lib.removeSuffix "\n" (builtins.readFile "${homedir}/.local/share/xtheme"); diff --git a/machines/helium.nix b/machines/helium.nix index f0869bc..093b25d 100644 --- a/machines/helium.nix +++ b/machines/helium.nix @@ -48,11 +48,6 @@ in { fira fira-code fira-code-symbols ]; - environment.variables = { - GDK_SCALE = "2"; - GDK_DPI_SCALE = "0.5"; - }; - environment.systemPackages = with pkgs; [ yubioath-desktop yubico-pam diff --git a/profiles/laptop.nix b/profiles/laptop.nix index c1eab46..cf8b708 100644 --- a/profiles/laptop.nix +++ b/profiles/laptop.nix @@ -46,6 +46,7 @@ position = "0x0"; mode = "1920x1080"; rate = "60.00"; + dpi = 156; }; in { -- cgit v1.2.3