Add custom options

This commit is contained in:
fleaz 2022-09-13 10:38:10 +02:00
parent 3660fecc5d
commit 0b817139d3
No known key found for this signature in database
GPG key ID: AED15F8FDD04D083
4 changed files with 14 additions and 2 deletions

8
customOptions.nix Normal file
View file

@ -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;
};
}

View file

@ -3,6 +3,7 @@
let
home-manager = (import ../nix/sources.nix).home-manager;
unstable = import <nixos-unstable> {};
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 = {

View file

@ -18,5 +18,8 @@
system.stateVersion = "21.11"; # Did you read the comment?
# Only 1080p :(
my.highDPI = false;
}

View file

@ -17,8 +17,8 @@
../modules/borgbackup.nix
../secrets/remote-builder.nix
../users/fleaz.nix
../customOptions.nix
];
# Set your time zone.