This commit is contained in:
Filippo Berto 2023-11-17 14:57:34 +01:00
parent b74916095a
commit dda78546c9
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056
3 changed files with 14 additions and 1 deletions

View file

@ -140,6 +140,7 @@
{ {
home-manager.users.bertof.imports = [ home-manager.users.bertof.imports = [
./modules/hm/hyprland.nix ./modules/hm/hyprland.nix
./modules/hm/swayidle.nix
]; ];
} }
] ++ homeManagerModules ++ [ ] ++ homeManagerModules ++ [
@ -168,6 +169,7 @@
{ {
home-manager.users.bertof.imports = [ home-manager.users.bertof.imports = [
./modules/hm/hyprland.nix ./modules/hm/hyprland.nix
./modules/hm/swayidle.nix
]; ];
} }
] ++ homeManagerModules ++ [ ] ++ homeManagerModules ++ [

View file

@ -11,7 +11,6 @@
# wayland.windowManager.hyprland = { }; # wayland.windowManager.hyprland = { };
xdg.configFile."hypr/hyprland.conf".text = xdg.configFile."hypr/hyprland.conf".text =
let let
strPalette = pkgs.lib.nix-rice.palette.toRgbaShortHex pkgs.rice.colorPalette; strPalette = pkgs.lib.nix-rice.palette.toRgbaShortHex pkgs.rice.colorPalette;

12
modules/hm/swayidle.nix Normal file
View file

@ -0,0 +1,12 @@
{ pkgs, ... }: {
services.swayidle = {
enable = true;
events = [
{ event = "before-sleep"; command = "${pkgs.way-lockscreen}/bin/way-lockscreen"; }
{ event = "lock"; command = "${pkgs.way-lockscreen}/bin/way-lockscreen"; }
];
timeouts = [
{ timeout = 60; command = "${pkgs.way-lockscreen}/bin/way-lockscreen"; }
];
};
}