summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2022-11-07 20:48:07 -0500
committerBen Sima <ben@bsima.me>2022-11-07 20:48:07 -0500
commit15dcb4f3eee0d52c6f8f0d62e01a32007631e489 (patch)
treeeff9c44cde3755aa5a9810966a6b5623d5cfc98b /lib
parent7ab2000e7ef58afe0dd97c293b2242f27238fa7b (diff)
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/common.nix8
-rw-r--r--lib/const.nix5
-rw-r--r--lib/linux.nix4
3 files changed, 10 insertions, 7 deletions
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");