home-manager
home-manager copied to clipboard
bug: hyprlock and hypridle not working in NixOS with Home Manager
Are you following the right branch?
- [X] My Nixpkgs and Home Manager versions are in sync
Is there an existing issue for this?
- [X] I have searched the existing issues
Issue description
I'm having issues getting hyprlock
and hypridle
to work in my NixOS setup using Home Manager. I'm able to build the system without any errors and the packages are present in the Nix store, but the commands and services are not found, and no configuration is generated.
Potentially related issues:
- https://github.com/nix-community/home-manager/issues/5687
- https://github.com/hyprwm/hyprlock/issues/450
What I've Tried:
- Verified that the packages are in the Nix store
- Checked for the presence of the commands using
which
- Attempted to start the services manually
- Checked for configuration files in
~/.config/hypr/
System Information:
- NixOS Version: 24.05
- Home Manager Version: 24.05
- Hyprland Version: 0.43.0
Service Status:
❯ systemctl --user list-unit-files | grep hypr
hyprpaper.service enabled enabled
xdg-desktop-portal-hyprland.service linked-runtime enabled
hyprland-session.target linked enabled
No Configs Generated:
❯ ls ~/.config/hypr
hyprland.conf hyprland.conf.backup hyprpaper.conf
Nix Store:
❯ ls /nix/store | rg -e '(hyprlock|hypridle)'
0bxazkddh9vlf708x3grkxvd8pz1x0li-hypridle-0.1.2
28g46b8p4hll15nwrw1iszvsgg7ddd77-hm_hyprhypridle.conf
a938cm6w4h4i51n106ksmc6cs6isx5j4-hyprlock-0.4.1.drv
akqffmrgvnh35fc1blfc75n40id3y3w8-hypridle-0.1.2
d7ydd20qwvhaiwccqj6m8r4kailci2ah-hyprlock-0.4.1
hdgb95i2g1l7z30slgc0z8v3xlyxglqz-hypridle.service.drv
jq5r1pfx9cww7xcljzhg6awv03jgg8fc-hypridle-0.1.2.drv
k1y1z0wsqwggydghnr50p7p4nd1fpn7a-hypridle.service
md2d79am59a7wkavc76348rmlw9yz7dr-hypridle-0.1.2.drv
rlwj88g6rk0jbq45a6ld4wiafn8dzxbz-hm_hyprhyprlock.conf.drv
w9wc84dy0vl6i0ldf69zzfqknhyrxidi-hyprlock-0.4.1
x7dbsshj8ynv9fhzij06lxcg99bckxla-hm_hyprhyprlock.conf
xmrszayh6f4812rgja0g8id8r55xmcsh-hm_hyprhypridle.conf.drv
zwxmi3bbgc695c4xw1sym4dvhkghdarm-hyprlock-0.4.1.drv
Configuration:
- hyprlock.nix:
{config, ...}: let
inherit (config.lib.stylix.colors) base00 base01 base05 base07;
in {
programs.hyprlock = {
enable = true;
settings = {
background = {
path = "screenshot";
blur_passes = 2;
blur_size = 7;
brightness = 0.8;
contrast = 0.8;
color = "${base00}99";
};
input-field = {
size = {
width = 200;
height = 50;
};
outline_thickness = 3;
dots_size = 0.33;
dots_spacing = 0.15;
dots_center = false;
outer_color = "${base01}";
inner_color = "${base07}";
font_color = "${base00}";
fade_on_empty = true;
placeholder_text = "<i>Input Password...</i>";
hide_input = false;
position = {
x = 0;
y = -20;
};
halign = "center";
valign = "center";
};
label = {
text = "$TIME";
color = "${base05}";
font_size = 50;
font_family = "Noto Sans";
position = {
x = 0;
y = 80;
};
halign = "center";
valign = "center";
};
};
};
}
- hypridle.nix:
{
services.hypridle = {
enable = true;
settings = {
general = {
lock_cmd = "hyprlock";
before_sleep_cmd = "hyprlock";
after_sleep_cmd = "hyprctl dispatch dpms on";
};
listener = [
{
timeout = 600;
on-timeout = "hyprlock";
}
{
timeout = 900;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
{
timeout = 1800;
on-timeout = "systemctl suspend";
}
];
};
};
}
Maintainer CC
@khaneliman @fufexan
System information
- system: `"x86_64-linux"`
- host os: `Linux 6.6.52, NixOS, 24.11 (Vicuna), 24.11.20240919.c04d565`
- multi-user?: `yes`
- sandbox: `yes`
- version: `nix-env (Nix) 2.18.5`
- nixpkgs: `/nix/store/hiasfhl8f5yy88hcfbr3s8s4bm63wsjw-source`