hyprpaper booting

This commit is contained in:
Barrett Ruth 2026-02-11 15:59:35 -05:00
parent 21382e22a0
commit d7f018939f
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
3 changed files with 54 additions and 54 deletions

View file

@ -1,32 +1,31 @@
{ {
lib, pkgs,
isNixOS,
... ...
}: }:
{ {
services.hypridle = { home.packages = [ pkgs.hypridle ];
enable = true;
package = lib.mkIf (!isNixOS) null; xdg.configFile."hypr/hypridle.conf".text = ''
settings = { general {
general = { lock_cmd = wp lock && hyprlock
lock_cmd = "wp lock && hyprlock"; after_sleep_cmd = hyprctl dispatch dpms on
after_sleep_cmd = "hyprctl dispatch dpms on";
};
listener = [
{
timeout = 300;
on-timeout = "wp lock && hyprlock";
} }
{
timeout = 600; listener {
on-timeout = "hyprctl dispatch dpms off"; timeout = 300
on-resume = "hyprctl dispatch dpms on"; on-timeout = wp lock && hyprlock
} }
{
timeout = 1800; listener {
on-timeout = "systemctl suspend"; timeout = 600
on-timeout = hyprctl dispatch dpms off
on-resume = hyprctl dispatch dpms on
} }
];
}; listener {
}; timeout = 1800
on-timeout = systemctl suspend
}
'';
} }

View file

@ -1,25 +1,26 @@
{ {
lib, pkgs,
config,
isNixOS, isNixOS,
... ...
}: }:
{ {
programs.hyprlock = { home.packages = [ pkgs.hyprlock ];
enable = true;
package = lib.mkIf (!isNixOS) null; xdg.configFile."hypr/hyprlock.conf".text = ''
settings = { general {
general = { hide_cursor = true
hide_cursor = true; grace = 0
grace = 0;
};
background = [
{
monitor = "";
path = "~/img/screen/lock.jpg";
} }
];
animations.enabled = false; background {
}; monitor =
}; path = ${config.home.homeDirectory}/img/screen/lock.jpg
}
animations {
enabled = false
}
'';
} }

View file

@ -1,6 +1,7 @@
{ {
pkgs, pkgs,
lib, lib,
config,
isNixOS, isNixOS,
... ...
}: }:
@ -8,13 +9,12 @@
{ {
home.packages = lib.mkIf isNixOS [ pkgs.hyprpaper ]; home.packages = lib.mkIf isNixOS [ pkgs.hyprpaper ];
services.hyprpaper = { xdg.configFile."hypr/hyprpaper.conf".text = ''
enable = true; wallpaper {
package = lib.mkIf (!isNixOS) null; monitor =
settings = { path = ${config.home.homeDirectory}/img/screen/wallpaper.jpg
preload = [ "~/img/screen/wallpaper.jpg" ]; }
wallpaper = [ ",~/img/screen/wallpaper.jpg" ];
splash = false; splash = false
}; '';
};
} }