Personal Nix setup

Add locking

Changed files
+81 -12
home
desktop
modules
desktop
+64 -2
home/desktop/hyprland.nix
···
];
bind = [
-
"$mod, Q, exec, uwsm-app ghostty"
+
"$mod, T, exec, uwsm-app ghostty"
"$mod, B, exec, uwsm-app zen-beta"
+
"$mod, W, killactive"
];
};
};
-
services.hyprpolkitagent.enable = true;
+
services = {
+
hyprpolkitagent.enable = true;
+
hypridle = {
+
enable = true;
+
package = null;
+
settings = {
+
general = {
+
lock_cmd = "pidof hyprlock || hyprlock";
+
before_sleep_cmd = "loginctl lock-session";
+
after_sleep_cmd = "hyprctl dispatch dpms on";
+
};
+
listener = [
+
{
+
timeout = 300;
+
on-timeout = "loginctl lock-session";
+
}
+
{
+
timeout = 330;
+
on-timeout = "hyprctl dispatch dpms off";
+
on-resume = "hyprctl dispatch dpms on";
+
}
+
{
+
timeout = 600;
+
on-timeout = "systemctl suspend";
+
}
+
];
+
};
+
};
+
};
+
+
programs.hyprlock = {
+
enable = true;
+
package = null;
+
settings = {
+
general = {
+
disable_loading_bar = true;
+
grace = 10;
+
hide_cursor = true;
+
no_fade_in = false;
+
};
+
background = [
+
{
+
path = "";
+
blur_passes = 3;
+
blur_size = 8;
+
}
+
];
+
input-field = [
+
{
+
size = "200, 50";
+
position = "0, -80";
+
dots_center = true;
+
fade_on_empty = false;
+
font_color = "rgb(202, 211, 245)";
+
inner_color = "rgb(91, 96, 120)";
+
outer_color = "rgb(24, 25, 38)";
+
outline_thickness = 5;
+
shadow_passes = 2;
+
}
+
];
+
};
+
};
home.pointerCursor = {
gtk.enable = true;
+17 -10
modules/desktop/session.nix
···
consoleLogLevel = 0;
};
-
services.greetd = {
-
enable = true;
+
services = {
+
greetd.enable = true;
+
hypridle.enable = true;
+
logind = {
+
powerKey = "suspend";
+
powerKeyLongPress = "poweroff";
+
lidSwitch = "suspend";
+
};
};
-
programs.regreet = {
-
enable = true;
-
};
-
-
programs.hyprland = {
-
enable = true;
-
withUWSM = true;
-
xwayland.enable = true;
+
programs = {
+
regreet.enable = true;
+
hyprlock.enable = true;
+
hyprland = {
+
enable = true;
+
withUWSM = true;
+
xwayland.enable = true;
+
};
};
security = {
polkit.enable = true;
+
pam.services.hyprlock = {};
};
xdg.portal = {