summaryrefslogtreecommitdiffstats
path: root/usecases/desktop/graphical/sway.nix
diff options
context:
space:
mode:
Diffstat (limited to 'usecases/desktop/graphical/sway.nix')
-rw-r--r--usecases/desktop/graphical/sway.nix121
1 files changed, 5 insertions, 116 deletions
diff --git a/usecases/desktop/graphical/sway.nix b/usecases/desktop/graphical/sway.nix
index ca7a286..34dc978 100644
--- a/usecases/desktop/graphical/sway.nix
+++ b/usecases/desktop/graphical/sway.nix
@@ -6,10 +6,11 @@ _inputs:
6 ... 6 ...
7}: 7}:
8{ 8{
9 services.greetd = { 9 reborn = {
10 enable = true; 10 greetd.enable = true;
11 vt = 6; 11 swaylock.enable = true;
12 settings.default_session.command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd sway"; 12 swaync.enable = true;
13 wlsunset.enable = true;
13 }; 14 };
14 15
15 home-manager.users.minijackson = 16 home-manager.users.minijackson =
@@ -214,117 +215,6 @@ _inputs:
214 }; 215 };
215 }; 216 };
216 217
217 services.swaync = {
218 enable = true;
219
220 settings = {
221 widgets = [
222 "buttons-grid"
223 "mpris"
224 "volume"
225 "backlight"
226 "inhibitors"
227 "title"
228 "dnd"
229 "notifications"
230 ];
231 widget-config = {
232 buttons-grid.actions = [
233 {
234 label = "󰜉";
235 command = "systemctl reboot";
236 }
237 {
238 label = "󰐥";
239 command = "systemctl poweroff";
240 }
241 ];
242 volume = {
243 label = "󰕾";
244 show-per-app = true;
245 show-per-app-label = true;
246 };
247 };
248 };
249
250 style = pkgs.substituteAll {
251 src = ./swaync.css;
252 inherit (osConfig.theme.colors)
253 background1
254 background2
255 background5
256 dimDominant
257 dominant
258 foreground
259 foreground3
260 softBackground
261 ;
262 };
263 };
264
265 services.wlsunset = {
266 enable = true;
267 latitude = "48.864716";
268 longitude = "2.349014";
269 # Reduce blue light anyways
270 temperature = {
271 day = 4000;
272 night = 2500;
273 };
274 };
275
276 programs.swaylock = {
277 enable = true;
278 settings =
279 let
280 inherit (osConfig.theme.colors)
281 background
282 brightGreen
283 brightOrange
284 brightRed
285 dominant
286 neutralOrange
287 neutralRed
288 ;
289 in
290 {
291 ignore-empty-password = true;
292 show-failed-attempts = true;
293
294 image = "${../../../res/wallpapers/wallpaper-1920x1080-install-gentoo.png}";
295
296 font = "monospace";
297
298 inside-color = "${lib.removePrefix "#" dominant}dd";
299 inside-clear-color = "${lib.removePrefix "#" neutralOrange}dd";
300 inside-ver-color = "${lib.removePrefix "#" neutralOrange}dd";
301 inside-wrong-color = "${lib.removePrefix "#" neutralRed}dd";
302
303 key-hl-color = "${lib.removePrefix "#" brightGreen}ee";
304 bs-hl-color = "${lib.removePrefix "#" neutralRed}ee";
305
306 line-color = "${lib.removePrefix "#" background}ee";
307 line-clear-color = "${lib.removePrefix "#" background}ee";
308 line-ver-color = "${lib.removePrefix "#" background}ee";
309 line-wrong-color = "${lib.removePrefix "#" background}ee";
310
311 ring-color = "${lib.removePrefix "#" dominant}ee";
312 ring-clear-color = "${lib.removePrefix "#" brightOrange}ee";
313 ring-ver-color = "${lib.removePrefix "#" brightOrange}ee";
314 ring-wrong-color = "${lib.removePrefix "#" brightRed}ee";
315
316 separator-color = "${lib.removePrefix "#" background}ee";
317
318 text-color = "${lib.removePrefix "#" background}ff";
319 text-clear-color = "${lib.removePrefix "#" background}ff";
320 text-ver-color = "${lib.removePrefix "#" background}ff";
321 text-wrong-color = "${lib.removePrefix "#" background}ff";
322
323 indicator-radius = 75;
324 indicator-thickness = 10;
325 };
326 };
327
328 xsession.importedVariables = [ 218 xsession.importedVariables = [
329 "DBUS_SESSION_BUS_ADDRESS" 219 "DBUS_SESSION_BUS_ADDRESS"
330 "DISPLAY" 220 "DISPLAY"
@@ -353,7 +243,6 @@ _inputs:
353 ]; 243 ];
354 244
355 programs.xwayland.enable = true; 245 programs.xwayland.enable = true;
356 security.pam.services.swaylock = { };
357 246
358 xdg.portal = { 247 xdg.portal = {
359 wlr = { 248 wlr = {