forked from louib/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
consts.nix
199 lines (181 loc) · 5.48 KB
/
consts.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
rec {
# This list is derived from
# https://github.com/numtide/flake-utils/blob/5aed5285a952e0b949eb3ba02c12fa4fcfef535f/default.nix#L3
# from which I removed the Darwin systems.
DEFAULT_SYSTEMS = [
"aarch64-linux"
"x86_64-linux"
];
DEFAULT_LOCALE = {
name = "en_CA.UTF-8";
ticker = "en";
gnome_input_name = "us";
};
LOCALES = [
DEFAULT_LOCALE
{
name = "fr_CA.UTF-8";
ticker = "ca";
gnome_input_name = "ca";
}
];
WEZTERM_CONFIG = builtins.readFile (./. + "/.wezterm.lua");
# We need to call a home-manager function to generate the input sources
# in a valid format.
GET_DCONF_INPUT_SOURCES = home-manager: {
"org/gnome/desktop/input-sources" = {
"sources" =
builtins.map
(
locale: home-manager.lib.hm.gvariant.mkTuple ["xkb" locale.gnome_input_name]
)
LOCALES;
"xkb-options" = ["caps:escape" "grp:win_space_toggle"];
};
};
GNOME_TERMINAL_PROFILE_SETTINGS = {
"use-system-font" = false;
"font" = "Monospace 14";
"audible-bell" = false;
"scrollback-unlimited" = true;
"palette" = [
"rgb(0,0,0)"
"rgb(170,0,0)"
"rgb(0,170,0)"
"rgb(240,167,94)"
"rgb(114,79,241)"
"rgb(170,0,170)"
"rgb(0,170,170)"
"rgb(206,105,105)"
"rgb(201,109,109)"
"rgb(194,27,27)"
"rgb(85,255,85)"
"rgb(200,200,136)"
"rgb(85,85,255)"
"rgb(224,55,224)"
"rgb(60,226,226)"
"rgb(185,78,78)"
];
};
DCONF_SETTINGS = {
"org/gnome/settings-daemon/plugins/color" = {
"night-light-enabled" = true;
};
"org/gnome/settings-daemon/plugins/color" = {
"night-light-schedule-automatic" = false;
};
"org/gnome/settings-daemon/plugins/color" = {
"night-light-schedule-from" = 0.0;
};
"org/gnome/settings-daemon/plugins/color" = {
"night-light-schedule-to" = 0.0;
};
"org/gnome/settings-daemon/plugins/color" = {
"night-light-temperature" = 2200;
};
"org/gnome/desktop/peripherals/touchpad" = {
"natural-scroll" = false;
};
"org/gnome/desktop/interface" = {
"show-battery-percentage" = true;
"color-scheme" = "prefer-dark";
};
# This will disable prompts when plugging in a USB key
"org/gnome/desktop/media-handling" = {
"automount" = false;
"automount-open" = false;
};
"org/gnome/shell" = {
"favorite-apps" = [
"org.gnome.Nautilus.desktop"
"org.keepassxc.KeePassXC.desktop"
"firefox.desktop"
"thunderbird.desktop"
"com.gitlab.newsflash.desktop"
# New reverse DNS for newsflash??
# "io.gitlab.news_flash.NewsFlash.desktop"
"org.wezfurlong.wezterm.desktop"
"org.gnome.Terminal.desktop"
];
};
# Gnome terminal options
"org/gnome/terminal/legacy/keybindings" = {
"default-show-menubar" = false;
};
"org/gnome/terminal/legacy/keybindings" = {
"prev-tab" = "<Primary>h";
};
"org/gnome/terminal/legacy/keybindings" = {
"next-tab" = "<Primary>l";
};
"org/gnome/terminal/legacy/keybindings" = {
"new-tab" = "<Primary>t";
};
"org/gnome/terminal/legacy/keybindings" = {
"full-screen" = "<Primary>f";
};
# This is disabled because the default binding (<Primary>p) interferes
# with neovim bindings.
"org/gnome/terminal/legacy/keybindings" = {
"find-previous" = "disabled";
};
"org/gnome/terminal/legacy" = {
"theme-variant" = "dark";
};
"org/gnome/terminal/legacy" = {
"new-tab-position" = "next";
};
# This is the default Ubuntu profile UUID
"org/gnome/terminal/legacy/profiles:/:b1dcc9dd-5262-4d8d-a863-c897e6d979b9" = GNOME_TERMINAL_PROFILE_SETTINGS;
# This is the default NixOS profile UUID
"org/gnome/terminal/legacy/profiles:/:93324bd5-ae93-45b8-9af9-a7dbc5bfcd42" = GNOME_TERMINAL_PROFILE_SETTINGS;
};
DEFAULT_USERNAME = "louib";
# See https://github.com/junegunn/fzf/wiki/Color-schemes#base-scheme for
# the configuration of the base schemes.
FZF_COLOR_SCHEME = "16";
FZF_COLOR_CODES = {
base03 = "234";
base02 = "235";
base01 = "240";
base00 = "241";
base0 = "244";
base1 = "245";
base2 = "254";
base3 = "230";
yellow = "136";
orange = "166";
red = "160";
magenta = "125";
violet = "61";
blue = "33";
cyan = "37";
green = "64";
};
# See https://github.com/junegunn/fzf/wiki/Color-schemes#color-configuration
# for all the color configurations
# There's a color picker here https://minsw.github.io/fzf-color-picker/
FZF_COLORS = {
# highlighted substring
"hl" = FZF_COLOR_CODES.magenta;
# highlighted substring (current line)
"hl+" = FZF_COLOR_CODES.red;
# Background (current line)
"bg+" = FZF_COLOR_CODES.violet;
# gutter on the left
"gutter" = FZF_COLOR_CODES.blue;
"fg+" = FZF_COLOR_CODES.base2;
"info" = FZF_COLOR_CODES.cyan;
"prompt" = FZF_COLOR_CODES.cyan;
"spinner" = "108";
"pointer" = FZF_COLOR_CODES.violet;
# "marker" = FZF_COLOR_CODES.base02;
"marker" = FZF_COLOR_CODES.yellow;
"header" = FZF_COLOR_CODES.cyan;
"border" = FZF_COLOR_CODES.yellow;
};
GET_FZF_COLORS_FLATTENED = nixpkgs:
builtins.concatStringsSep ","
(nixpkgs.lib.mapAttrsToList (name: value: "${name}:${value}") FZF_COLORS);
GET_FZF_DEFAULT_OPTIONS = nixpkgs: "export FZF_DEFAULT_OPTS=\"$FZF_DEFAULT_OPTS --color ${FZF_COLOR_SCHEME},${GET_FZF_COLORS_FLATTENED nixpkgs}\"";
}