diff --git a/customOptions.nix b/customOptions.nix new file mode 100644 index 0000000..f700842 --- /dev/null +++ b/customOptions.nix @@ -0,0 +1,8 @@ +{lib,...}:{ + +options.my.highDPI = lib.mkOption { + description = "If the device has a high DPI screen"; + default = true; + type = lib.types.bool; + }; +} diff --git a/home-manager/default.nix b/home-manager/default.nix index 895837c..24462a9 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -3,6 +3,7 @@ let home-manager = (import ../nix/sources.nix).home-manager; unstable = import {}; + fontSize = hiDPI : if hiDPI then "FiraCode:size=14" else "FiraCode:size=8"; in { imports = [ @@ -277,7 +278,7 @@ in settings = { main = { term = "xterm-256color"; - font = "FiraCode:size=14"; + font = fontSize config.my.highDPI; }; scrollback = { lines = 100000; }; colors = { diff --git a/machines/milhouse/configuration.nix b/machines/milhouse/configuration.nix index 62c1e99..d2b6542 100644 --- a/machines/milhouse/configuration.nix +++ b/machines/milhouse/configuration.nix @@ -18,5 +18,8 @@ system.stateVersion = "21.11"; # Did you read the comment? + # Only 1080p :( + my.highDPI = false; + } diff --git a/roles/all.nix b/roles/all.nix index ebea1a6..2f727ad 100644 --- a/roles/all.nix +++ b/roles/all.nix @@ -17,8 +17,8 @@ ../modules/borgbackup.nix ../secrets/remote-builder.nix - ../users/fleaz.nix + ../customOptions.nix ]; # Set your time zone.