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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
{ inputs, nixStd, config, ctucxConfig, lib, pkgs, ... }:
{
nixpkgs.overlays = [(final: prev: {
# patch gdm to automaticly select the first user
gnome-shell = prev.gnome-shell.overrideAttrs (prevAttrs: {
patches = prevAttrs.patches ++ [ ../../../packages/patches/gdm-autoselect-user.patch ];
});
# deactivate some backends
gnome-online-accounts = prev.gnome-online-accounts.overrideAttrs( prevAttrs: {
mesonFlags = prevAttrs.mesonFlags ++ [ "-Dexchange=false" "-Dgoogle=false" "-Dkerberos=false" "-Downcloud=false" "-Dwindows_live=false" "-Dms_graph=false" ];
});
})];
imports = [
ctucxConfig.configure.mobile-device
ctucxConfig.configure.thunderbolt
ctucxConfig.configure.fonts
ctucxConfig.configure.pipewire
ctucxConfig.configure.gvfs
ctucxConfig.configure.avahi
ctucxConfig.services.syncthing
ctucxConfig.programs.gpg
ctucxConfig.programs.ddcutil
ctucxConfig.programs.ausweisapp
];
home-manager.users.katja.imports = [
ctucxConfig.homeManager.configure.xdg
ctucxConfig.homeManager.programs.ghostty
ctucxConfig.homeManager.programs.ssh
ctucxConfig.homeManager.programs.git
ctucxConfig.homeManager.programs.yt-dlp
ctucxConfig.homeManager.programs.phockup
ctucxConfig.homeManager.programs.bitwarden-cli
# ctucxConfig.homeManager.programs.password-store
ctucxConfig.homeManager.programs.firefox
ctucxConfig.homeManager.programs.thunderbird
ctucxConfig.homeManager.programs.fractal
ctucxConfig.homeManager.programs.tuba
ctucxConfig.homeManager.programs.paper-plane
ctucxConfig.homeManager.programs.typst
ctucxConfig.homeManager.programs.ocrmypdf
ctucxConfig.homeManager.programs.papers
ctucxConfig.homeManager.programs.libreoffice
ctucxConfig.homeManager.programs.apostrophe
ctucxConfig.homeManager.programs.celluloid
ctucxConfig.homeManager.gnomeExtensions.dash-to-dock
ctucxConfig.homeManager.gnomeExtensions.just-perfection
ctucxConfig.homeManager.gnomeExtensions.space-bar
ctucxConfig.homeManager.gnomeExtensions.search-light
ctucxConfig.homeManager.gnomeExtensions.emoji-copy
ctucxConfig.homeManager.gnomeExtensions.pip-on-top
ctucxConfig.homeManager.gnomeExtensions.bluetoothBatteryMeter
];
wm.gnome.enable = true;
wm.gnome.gdm.dconfSettings = {
"org/gnome/desktop/a11y" = {
always-show-universal-access-status = false;
};
"org/gnome/login-screen" = {
banner-message-enable = true;
banner-message-text = "katja (fedi/mail: katja@ctu.cx)";
};
};
users.users.katja.extraGroups = [ "dialout" "networkmanager"];
hardware.bluetooth.settings = {
General.Experimental = true;
};
services = {
nscd.enable = true;
printing.enable = true;
#required for gnome-calendar
gnome.evolution-data-server.enable = true;
gnome.gnome-online-accounts.enable = true;
};
home-manager.users.katja = {
manual.html.enable = true;
home.sessionVariables = {
QT_QPA_PLATFORMTHEME = "gnome";
};
home.packages = with pkgs; [
gnome-calendar
gnome-text-editor
gnome-podcasts
gnome-obfuscate
gnome-power-manager
loupe
errands
diebahn
cozy
refine
xdg-utils
qgnomeplatform
wl-clipboard-x11
# look and feel from libadwaita ported to GTK-3
adw-gtk3
] ++ (with pkgs.gnomeExtensions; [
airpod-battery-monitor
battery-time-percentage-compact
caffeine
]);
gtk = {
enable = true;
iconTheme.package = pkgs.adwaita-colors-icon-theme;
iconTheme.name = "Adwaita-green";
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = 1;
gtk-theme-name = "adw-gtk3-dark";
};
gtk4.extraCss = ''
/* remove 'starred' in nautilus side-panel */
.nautilus-window .navigation-sidebar > .sidebar-row:nth-child(2) {
min-height:0;
font-size: 0;
-gtk-icon-size: 0;
margin-top: -2px;
}
'';
};
# Use `dconf watch /` to track stateful changes you are doing and store them here.
dconf.settings = with inputs.homeManager.lib.hm.gvariant; let
numWorkspaces = 7;
workspaces = (
numWorkspaces
|> nixStd.list.unfold( n:
if n == 0 then
nixStd.optional.nothing
else
nixStd.optional.just( nixStd.tuple.tuple2 n (n - 1))
)
|> lib.lists.reverseList
);
in {
"org/gnome/mutter" = {
edge-tiling = true;
dynamic-workspaces = false;
# Enable fractional scaling
experimental-features = [ "scale-monitor-framebuffer" ];
};
"org/gnome/desktop/wm/preferences" = {
button-layout = "close:appmenu";
auto-raise = false;
focus-mode = "sloppy";
num-workspaces = lib.lists.last workspaces;
workspace-names = [ "Main" "Mail" "Term" ];
};
"org/gnome/desktop/wm/keybindings" = builtins.listToAttrs( builtins.concatMap( v: [
{ name = "switch-to-workspace-${toString v}"; value = [ "<Super>${toString v}" ]; }
{ name = "move-to-workspace-${toString v}"; value = [ "<Super><Shift>${toString v}" ]; }
]) workspaces) // {
switch-input-source = [ "<Control><Super>space" ];
switch-input-source-backward = [ "<Shift><Control><Super>space" ];
};
"org/gnome/shell" = {
disable-extension-version-validation = true;
disable-user-extensions = false;
enabled-extensions = with pkgs.gnomeExtensions; [
airpod-battery-monitor.extensionUuid
battery-time-percentage-compact.extensionUuid
caffeine.extensionUuid
];
favorite-apps = [
"org.gnome.Nautilus.desktop"
"firefox.desktop"
"thunderbird.desktop"
"org.gnome.Fractal.desktop"
"app.drey.PaperPlane.desktop"
"dev.geopjr.Tuba.desktop"
"de.schmidhuberj.DieBahn.desktop"
"org.gnome.Calendar.desktop"
"io.github.mrvladus.List.desktop"
"org.gnome.Podcasts.desktop"
"com.mitchellh.ghostty.desktop"
"org.gnome.Settings.desktop"
];
};
"org/gnome/shell/keybindings" = builtins.listToAttrs( map( v: { name = "switch-to-application-${toString v}"; value = []; }) workspaces);
"org/gnome/settings-daemon/plugins/color".night-light-enabled = true;
"org/gnome/settings-daemon/plugins/media-keys" = {
custom-keybindings = [ "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/" ];
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
name = "Start Terminal";
command = "ghostty";
binding = "<Super>Return";
};
"org/gnome/settings-daemon/plugins/power" = {
sleep-inactive-ac-type = "nothing";
};
"org/gnome/desktop/a11y".always-show-universal-access-status = false;
"org/gnome/desktop/privacy".remember-recent-files = false;
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
accent-color = "green";
enable-hot-corners = false;
show-battery-percentage = true;
};
"org/gnome/desktop/input-sources" = {
sources = [
(mkTuple ["xkb" "us+mac"])
(mkTuple ["xkb" "de"])
(mkTuple ["xkb" "ru+mac"])
];
};
"org/gnome/desktop/background" = {
picture-uri = "file://${pkgs.nixos-artwork.wallpapers.simple-blue.gnomeFilePath}";
picture-uri-dark = "file://${pkgs.nixos-artwork.wallpapers.simple-dark-gray.gnomeFilePath}";
};
"org/gnome/desktop/screensaver" = {
picture-uri = "file://${pkgs.nixos-artwork.wallpapers.simple-dark-gray.gnomeFilePath}";
primary-color = "#3465a4";
secondary-color = "#000000";
};
"org/gnome/nautilus/list-view" = {
use-tree-view = true;
default-zoom-level = "small";
};
"org/gnome/nautilus/preferences" = {
date-time-format = "detailed";
default-folder-viewer = "list-view";
};
};
};
}