sisko/home: Configure hypr* in nix

This commit is contained in:
2026-06-05 23:55:23 +02:00
parent 1fc54a31cd
commit fc9e1572d1
10 changed files with 931 additions and 97 deletions
+45
View File
@@ -0,0 +1,45 @@
{
config,
pkgs,
lib,
...
}:
let
cfg = config.wayland.windowManager.hyprland;
in
{
config = lib.mkIf cfg.enable {
services.hypridle = {
enable = true;
settings = {
general = {
ignore_dbus_inhibit = false;
lock_cmd = "pidof hyprlock || ${config.programs.hyprlock.package}/bin/hyprlock";
before_sleep_cmd = "${pkgs.systemd}/bin/loginctl lock-session";
after_sleep_cmd = "${cfg.finalPackage}/bin/hyprctl dispatch dpms on";
};
listener = [
{
timeout = 8 * 60;
on-timeout = "${pkgs.libnotify}/bin/notify-send \"You are idle!\"";
}
{
timeout = 10 * 60;
on-timeout = "${config.programs.hyprlock.package}/bin/hyprlock";
}
{
timeout = 15 * 60;
on-timeout = "${pkgs.systemd}/bin/systemctl suspend";
}
];
};
};
# TODO - Remove?
systemd.user.services.hypridle = {
Unit.After = lib.mkForce "graphical-session.target";
Service.Slice = "session.slice";
};
};
}