summaryrefslogtreecommitdiffstats
path: root/usecases/desktop/graphical
diff options
context:
space:
mode:
Diffstat (limited to 'usecases/desktop/graphical')
-rw-r--r--usecases/desktop/graphical/greetd.nix29
-rw-r--r--usecases/desktop/graphical/sway.nix121
-rw-r--r--usecases/desktop/graphical/swaylock.nix65
-rw-r--r--usecases/desktop/graphical/swaync.nix47
-rw-r--r--usecases/desktop/graphical/wlsunset.nix23
5 files changed, 169 insertions, 116 deletions
diff --git a/usecases/desktop/graphical/greetd.nix b/usecases/desktop/graphical/greetd.nix
new file mode 100644
index 0000000..615b3b5
--- /dev/null
+++ b/usecases/desktop/graphical/greetd.nix
@@ -0,0 +1,29 @@
1{
2 config,
3 pkgs,
4 lib,
5 ...
6}:
7let
8 cfg = config.reborn.greetd;
9in
10{
11 options.reborn.greetd = {
12 enable = lib.mkEnableOption "Reborn greetd config";
13
14 command = lib.mkOption {
15 description = "Default session command";
16 type = lib.types.str;
17 default = "sway";
18 };
19 };
20
21 config = lib.mkIf cfg.enable {
22 services.greetd = {
23 enable = true;
24 vt = 6;
25 settings.default_session.command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd ${cfg.command}";
26 };
27
28 };
29}
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 = {
diff --git a/usecases/desktop/graphical/swaylock.nix b/usecases/desktop/graphical/swaylock.nix
new file mode 100644
index 0000000..6dc7683
--- /dev/null
+++ b/usecases/desktop/graphical/swaylock.nix
@@ -0,0 +1,65 @@
1{ config, lib, ... }:
2let
3 cfg = config.reborn.swaylock;
4in
5{
6 options.reborn.swaylock = {
7 enable = lib.mkEnableOption "Reborn swaylock config";
8 };
9
10 config = lib.mkIf cfg.enable {
11 home-manager.users.minijackson.programs.swaylock = {
12 enable = true;
13 settings =
14 let
15 inherit (config.theme.colors)
16 background
17 brightGreen
18 brightOrange
19 brightRed
20 dominant
21 neutralOrange
22 neutralRed
23 ;
24 in
25 {
26 ignore-empty-password = true;
27 show-failed-attempts = true;
28
29 image = "${../../../res/wallpapers/wallpaper-1920x1080-install-gentoo.png}";
30
31 font = "monospace";
32
33 inside-color = "${lib.removePrefix "#" dominant}dd";
34 inside-clear-color = "${lib.removePrefix "#" neutralOrange}dd";
35 inside-ver-color = "${lib.removePrefix "#" neutralOrange}dd";
36 inside-wrong-color = "${lib.removePrefix "#" neutralRed}dd";
37
38 key-hl-color = "${lib.removePrefix "#" brightGreen}ee";
39 bs-hl-color = "${lib.removePrefix "#" neutralRed}ee";
40
41 line-color = "${lib.removePrefix "#" background}ee";
42 line-clear-color = "${lib.removePrefix "#" background}ee";
43 line-ver-color = "${lib.removePrefix "#" background}ee";
44 line-wrong-color = "${lib.removePrefix "#" background}ee";
45
46 ring-color = "${lib.removePrefix "#" dominant}ee";
47 ring-clear-color = "${lib.removePrefix "#" brightOrange}ee";
48 ring-ver-color = "${lib.removePrefix "#" brightOrange}ee";
49 ring-wrong-color = "${lib.removePrefix "#" brightRed}ee";
50
51 separator-color = "${lib.removePrefix "#" background}ee";
52
53 text-color = "${lib.removePrefix "#" background}ff";
54 text-clear-color = "${lib.removePrefix "#" background}ff";
55 text-ver-color = "${lib.removePrefix "#" background}ff";
56 text-wrong-color = "${lib.removePrefix "#" background}ff";
57
58 indicator-radius = 75;
59 indicator-thickness = 10;
60 };
61 };
62
63 security.pam.services.swaylock = { };
64 };
65}
diff --git a/usecases/desktop/graphical/swaync.nix b/usecases/desktop/graphical/swaync.nix
new file mode 100644
index 0000000..34b7dba
--- /dev/null
+++ b/usecases/desktop/graphical/swaync.nix
@@ -0,0 +1,47 @@
1{ config, lib, ... }:
2let
3 cfg = config.reborn.swaync;
4in
5{
6 options.reborn.swaync = {
7 enable = lib.mkEnableOption "Reborn swaync config";
8 };
9
10 config = lib.mkIf cfg.enable {
11 home-manager.users.minijackson.services.swaync = {
12 enable = true;
13
14 settings = {
15 widgets = [
16 "buttons-grid"
17 "mpris"
18 "volume"
19 "backlight"
20 "inhibitors"
21 "title"
22 "dnd"
23 "notifications"
24 ];
25 widget-config = {
26 buttons-grid.actions = [
27 {
28 label = "󰜉";
29 command = "systemctl reboot";
30 }
31 {
32 label = "󰐥";
33 command = "systemctl poweroff";
34 }
35 ];
36 volume = {
37 label = "󰕾";
38 show-per-app = true;
39 show-per-app-label = true;
40 };
41 };
42 };
43
44 style = ./swaync.css;
45 };
46 };
47}
diff --git a/usecases/desktop/graphical/wlsunset.nix b/usecases/desktop/graphical/wlsunset.nix
new file mode 100644
index 0000000..869f377
--- /dev/null
+++ b/usecases/desktop/graphical/wlsunset.nix
@@ -0,0 +1,23 @@
1{ config, lib, ... }:
2let
3 cfg = config.reborn.wlsunset;
4in
5{
6 options.reborn.wlsunset = {
7 enable = lib.mkEnableOption "Reborn wlsunset config";
8 };
9
10 config = lib.mkIf cfg.enable {
11 home-manager.users.minijackson.services.wlsunset = {
12 enable = true;
13 latitude = "48.864716";
14 longitude = "2.349014";
15 # Reduce blue light anyways
16 temperature = {
17 day = 4000;
18 night = 2500;
19 };
20 };
21
22 };
23}