Add custom options
This commit is contained in:
parent
3660fecc5d
commit
0b817139d3
8
customOptions.nix
Normal file
8
customOptions.nix
Normal 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;
|
||||||
|
};
|
||||||
|
}
|
|
@ -3,6 +3,7 @@
|
||||||
let
|
let
|
||||||
home-manager = (import ../nix/sources.nix).home-manager;
|
home-manager = (import ../nix/sources.nix).home-manager;
|
||||||
unstable = import <nixos-unstable> {};
|
unstable = import <nixos-unstable> {};
|
||||||
|
fontSize = hiDPI : if hiDPI then "FiraCode:size=14" else "FiraCode:size=8";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -277,7 +278,7 @@ in
|
||||||
settings = {
|
settings = {
|
||||||
main = {
|
main = {
|
||||||
term = "xterm-256color";
|
term = "xterm-256color";
|
||||||
font = "FiraCode:size=14";
|
font = fontSize config.my.highDPI;
|
||||||
};
|
};
|
||||||
scrollback = { lines = 100000; };
|
scrollback = { lines = 100000; };
|
||||||
colors = {
|
colors = {
|
||||||
|
|
|
@ -18,5 +18,8 @@
|
||||||
|
|
||||||
system.stateVersion = "21.11"; # Did you read the comment?
|
system.stateVersion = "21.11"; # Did you read the comment?
|
||||||
|
|
||||||
|
# Only 1080p :(
|
||||||
|
my.highDPI = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@
|
||||||
../modules/borgbackup.nix
|
../modules/borgbackup.nix
|
||||||
|
|
||||||
../secrets/remote-builder.nix
|
../secrets/remote-builder.nix
|
||||||
|
|
||||||
../users/fleaz.nix
|
../users/fleaz.nix
|
||||||
|
../customOptions.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
|
|
Loading…
Reference in a new issue