dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
modules/desktop/_wm/shell.nix (11200B)
1## Noctalia Shell
2{
3 inputs ? null,
4 files ? null,
5 ...
6}: {
7 home = {
8 config,
9 osConfig ? {},
10 lib,
11 ...
12 }: let
13 output = osConfig.gui.display or "eDP-1";
14 sync = config.services.syncthing.enable;
15 in {
16 imports = [inputs.noctalia.homeModules.default];
17 gui._unmanaged = ["noctalia-shell"];
18 home.persist.directories = [
19 ".cache/noctalia"
20 ".local/state/noctalia"
21 ];
22
23 # ! # https://github.com/noctalia-dev/noctalia/pull/4707
24 systemd.user.services = {
25 noctalia.Service = {
26 Type = "dbus";
27 BusName = "org.kde.StatusNotifierWatcher";
28 };
29
30 easyeffects = lib.mkIf config.services.easyeffects.enable {
31 Unit = {
32 After = ["noctalia.service"];
33 Wants = ["noctalia.service"];
34 };
35 };
36 };
37
38 programs.noctalia = {
39 enable = true;
40 systemd.enable = true;
41 settings = {
42 shell = {
43 font_family = config.stylix.fonts.sansSerif.name;
44 avatar_path = "~/.face";
45 polkit_agent = true;
46 password_style = "random";
47 launch_apps_as_systemd_services = true;
48 settings_show_advanced = true;
49 greeter_sync.auto_sync = true;
50
51 launcher.providers = {
52 calculator.prefix = "=";
53 emoji.prefix = "e";
54 panels.prefix = "p";
55 session.prefix = "s";
56 windows.prefix = "w";
57 wallpaper.prefix = "wl";
58 };
59
60 panel = {
61 list_item_background = true;
62 open_near_click_control_center = true;
63 open_near_click_session = true;
64 };
65
66 window_switcher = {
67 mru = true;
68 show_all_outputs = false;
69 };
70
71 # Clipboard
72 clipboard_enabled = true;
73 clipboard_history_max_entries = 150;
74
75 # Screenshots
76 screenshot = {
77 save_to_file = true;
78 copy_to_clipboard = true;
79 freeze_screen = true;
80 confirm_region = true;
81 show_cursor = true;
82 remember_last_region = true;
83 annotate = true;
84 skip_annotate_on_copy_save = true;
85 directory = "~/Pictures/Screenshots";
86 };
87
88 # Appearance
89 shadow.direction = "center";
90 screen_corners = {
91 enabled = true;
92 size = 30;
93 };
94 };
95
96 theme = {
97 source = "custom";
98 custom_palette = "stylix";
99 mode = "dark";
100 builtin = "Catppuccin";
101 templates = {
102 builtin_ids = ["qt"];
103 enable_builtin_templates = false;
104 enable_community_templates = false;
105 };
106 };
107
108 # Bar
109 bar.main = {
110 position = "top";
111 start = lib.mkDefault ["control-center" "taskbar" "media"];
112 center = ["launcher" "notes" "clock" "weather" "recorder"];
113 end = [
114 "group:g2"
115 "clipboard"
116 "bluetooth"
117 "network"
118 "volume"
119 "brightness"
120 "battery"
121 "notifications"
122 "session"
123 ];
124 background_opacity = 0.75;
125 margin_edge = 0;
126 margin_ends = 0;
127 padding = 15;
128 radius = 0;
129 scale = 1.1;
130 thickness = 30;
131 widget_spacing = 14;
132 capsule_group = [
133 {
134 id = "g2";
135 members = ["tray"] ++ lib.optional sync "syncthing";
136 }
137 ];
138 };
139
140 # Widgets
141 widget = {
142 clock.anchor = true;
143 network.show_label = false;
144 notes.type = "noctalia/notes:notes";
145 recorder.type = "noctalia/screen_recorder:recorder";
146 control-center = {
147 custom_image = files.images.nixos;
148 custom_image_colorize = true;
149 };
150 media = {
151 hide_when_no_media = true;
152 title_scroll = "on_hover";
153 };
154 weather = {
155 show_condition = false;
156 show_temperature = false;
157 };
158 taskbar = {
159 group_by_workspace = true;
160 inactive_opacity = 0.85;
161 scale = 1.1;
162 show_active_indicator = false;
163 workspace_label_placement = "inside";
164 };
165 syncthing = lib.mkIf sync {
166 type = "rylos/syncthing:bar";
167 enable_scroll = false;
168 show_pending = false;
169 };
170 };
171
172 system.monitor.enabled = true;
173 control_center = {
174 sidebar_section = "none";
175 calendar.show_week_numbers = true;
176 };
177
178 # Audio
179 audio = {
180 enable_overdrive = true;
181 enable_sounds = true;
182 sound_volume = 1.0;
183 };
184
185 # Calendar
186 calendar = {
187 enabled = true;
188 account.personal_google.type = "google";
189 };
190
191 # Notifications
192 notification = {
193 enable_daemon = true;
194 layer = "overlay";
195 filter.power = {
196 enabled = true;
197 match = "poweralertd";
198 play_sound = true;
199 save_history = false;
200 show_toast = true;
201 };
202 };
203 osd.background_opacity = 0.75;
204
205 # Wallpaper
206 wallpaper = {
207 enabled = true;
208 fill_mode = "crop";
209 transition_on_startup = true;
210 default.path = osConfig.stylix.image or "";
211 };
212
213 # Desktop Widgets
214 desktop_widgets = {
215 schema_version = 2;
216 widget_order = ["desktop-widget-0000000000000001" "desktop-widget-0000000000000002"];
217 grid = {
218 cell_size = 16;
219 major_interval = 4;
220 visible = true;
221 };
222 widget = {
223 "desktop-widget-0000000000000001" = {
224 inherit output;
225 type = "clock";
226 settings = {
227 background = false;
228 center_text = true;
229 clock_style = "analog";
230 format = "{:%H:%M:%S}";
231 shadow = true;
232 };
233 };
234 "desktop-widget-0000000000000002" = {
235 inherit output;
236 type = "weather";
237 settings = {
238 background = false;
239 show_forecast = false;
240 };
241 };
242 };
243 };
244
245 # Screen Idle
246 idle = {
247 pre_action_fade_seconds = 10;
248 behavior = {
249 lock = {
250 enabled = true;
251 timeout = 300;
252 command = "noctalia:session lock";
253 };
254 screen-off = {
255 enabled = true;
256 timeout = 360;
257 command = "noctalia:dpms-off";
258 resume_command = "noctalia:dpms-on";
259 };
260 suspend = {
261 enabled = true;
262 timeout = 600;
263 action = "suspend";
264 lock_before_suspend = true;
265 };
266 };
267 };
268
269 # Lock Screen
270 lockscreen = {
271 enabled = true;
272 blurred_desktop = false;
273 blur_intensity = 0.0;
274 tint_intensity = 0.25;
275 transition = ["honeycomb"];
276 };
277
278 # Lockscreen Widgets
279 lockscreen_widgets = {
280 enabled = true;
281 schema_version = 2;
282 widget_order = [
283 "lockscreen-login-box@${output}"
284 "lockscreen-widget-0000000000000001"
285 ];
286 grid = {
287 cell_size = 16;
288 major_interval = 4;
289 visible = true;
290 };
291 widget = {
292 "lockscreen-login-box@${output}" = {
293 inherit output;
294 type = "login_box";
295 settings = {
296 background_color = "surface_variant";
297 background_opacity = 0.88;
298 background_radius = 12.0;
299 input_opacity = 1.0;
300 input_radius = 6.0;
301 layout = "regular";
302 center_password_text = false;
303 show_caps_lock = true;
304 show_keyboard_layout = true;
305 show_login_button = true;
306 show_session_buttons = false;
307 };
308 };
309 "lockscreen-widget-0000000000000001" = {
310 inherit output;
311 type = "clock";
312 settings.format = "{:%H:%M:%S}";
313 };
314 };
315 };
316
317 # Night Light
318 nightlight = {
319 enabled = true;
320 temperature_day = 6500;
321 temperature_night = 4000;
322 };
323
324 # Weather
325 weather.enabled = true;
326 location = {
327 auto_locate = true;
328 sunset = "19:00";
329 sunrise = "06:00";
330 };
331
332 # Plugins
333 plugins = {
334 source = [
335 {
336 name = "official";
337 kind = "git";
338 location = "https://github.com/noctalia-dev/official-plugins";
339 }
340 {
341 name = "community";
342 kind = "git";
343 location = "https://github.com/noctalia-dev/community-plugins";
344 }
345 {
346 name = "local";
347 kind = "path";
348 location = files.noctalia;
349 }
350 ];
351 enabled =
352 [
353 "noctalia/notes"
354 "noctalia/screen_recorder"
355 "noctalia/timer"
356 "maydayv7/keyhelp"
357 ]
358 ++ lib.optional sync "rylos/syncthing";
359 };
360 plugin_settings."noctalia/notes".panel_placement = "attached";
361 plugin_settings."noctalia/screen_recorder" = {
362 copy_to_clipboard = true;
363 video_source = "portal";
364 };
365 };
366
367 # Color Palette
368 customPalettes.stylix.dark = with config.lib.stylix.colors.withHashtag; {
369 primary = base0D;
370 onPrimary = base00;
371 secondary = base0E;
372 onSecondary = base00;
373 tertiary = base0C;
374 onTertiary = base00;
375 error = base08;
376 onError = base00;
377 surface = base00;
378 onSurface = base05;
379 surfaceVariant = base01;
380 onSurfaceVariant = base04;
381 outline = base03;
382 shadow = base00;
383 hover = base0C;
384 onHover = base00;
385 terminal = {
386 normal = {
387 black = base00;
388 red = base08;
389 green = base0B;
390 yellow = base0A;
391 blue = base0D;
392 magenta = base0E;
393 cyan = base0C;
394 white = base05;
395 };
396 bright = {
397 black = base03;
398 red = base08;
399 green = base0B;
400 yellow = base0A;
401 blue = base0D;
402 magenta = base0E;
403 cyan = base0C;
404 white = base07;
405 };
406 foreground = base05;
407 background = base00;
408 cursor = base05;
409 cursorText = base00;
410 selectionFg = base05;
411 selectionBg = base02;
412 };
413 };
414 };
415 };
416}