Kieran's opinionated (and probably slightly dumb) nix config
1{
2 inputs,
3 lib,
4 config,
5 pkgs,
6 ...
7}: {
8 xdg.configFile."sunpaper/config".source = ./dots/sunpaperconfig;
9 xdg.configFile."hypr/hyprland.conf".source = ./dots/hyprland.conf;
10 xdg.configFile."hypr/hyprlock.conf".source = ./dots/hyprlock.conf;
11 xdg.configFile."hypr/macchiato.conf".source = ./dots/macchiato.conf;
12 xdg.configFile."face.png".source = ./dots/face.png;
13
14 programs.hyprlock.enable = true;
15 services.hypridle = {
16 enable = true;
17 settings= {
18 general = {
19 after_sleep_cmd = "hyprctl dispatch dpms on";
20 before_sleep_cmd = "hyprlock";
21 ignore_dbus_inhibit = false;
22 lock_cmd = "pidof hyprlock || hyprlock";
23 };
24
25 listener = [
26 {
27 timeout = 30;
28 on-timeout = "kill $(pidof wluma); brightnessctl -s set 10";
29 on-resume = "brightnessctl -r; wluma &";
30 }
31 {
32 timeout = 45;
33 on-timeout = "loginctl lock-session";
34 }
35 {
36 timeout = 90;
37 on-timeout = "hyprctl dispatch dpms off";
38 on-resume = "hyprctl dispatch dpms on";
39 }
40 {
41 timeout = 150;
42 on-timeout = "systemctl suspend";
43 }
44 ];
45 };
46 };
47}