Merge remote-tracking branch 'origin/nixos' into nixos
This commit is contained in:
commit
2a9648a3ec
2 changed files with 45 additions and 28 deletions
|
|
@ -75,32 +75,35 @@ in
|
|||
|
||||
|
||||
# lock screen after timeout
|
||||
home-manager.users.moritz.services.swayidle = {
|
||||
enable = true;
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "${pkgs.swaylock-effects}/bin/swaylock -fF";
|
||||
}
|
||||
{
|
||||
event = "lock";
|
||||
command = "${pkgs.swaylock-effects}/bin/swaylock -fF";
|
||||
}
|
||||
];
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 300;
|
||||
command = "${hyprland}/bin/hyprctl dispatch dpms off";
|
||||
resumeCommand = "${hyprland}/bin/hyprctl dispatch dpms on";
|
||||
}
|
||||
{
|
||||
timeout = 310;
|
||||
command = "${pkgs.systemd}/bin/loginctl lock-session";
|
||||
}
|
||||
];
|
||||
home-manager.users.moritz = {
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "${pkgs.swaylock-effects}/bin/swaylock -fF";
|
||||
}
|
||||
{
|
||||
event = "lock";
|
||||
command = "${pkgs.swaylock-effects}/bin/swaylock -fF";
|
||||
}
|
||||
];
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 300;
|
||||
command = "${hyprland}/bin/hyprctl dispatch dpms off";
|
||||
resumeCommand = "${hyprland}/bin/hyprctl dispatch dpms on";
|
||||
}
|
||||
{
|
||||
timeout = 310;
|
||||
command = "${pkgs.systemd}/bin/loginctl lock-session";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# start swayidle as part of hyprland, not sway
|
||||
systemd.user.services.swayidle.Install.WantedBy = lib.mkForce [ "hyprland-session.target" ];
|
||||
};
|
||||
# start swayidle as part of hyprland, not sway
|
||||
systemd.user.services.swayidle.Install.WantedBy = lib.mkForce [ "hyprland-session.target" ];
|
||||
|
||||
# adds pam module for swaylock
|
||||
security.pam.services.swaylock = { };
|
||||
|
|
@ -116,7 +119,7 @@ in
|
|||
};
|
||||
|
||||
# set hyprpaper conf (for setting initial background)
|
||||
xdg.configFile."hypr/hyprpaper.conf" = {
|
||||
home-manager.users.moritz.xdg.configFile."hypr/hyprpaper.conf" = {
|
||||
text =
|
||||
let
|
||||
setWallpaper = wallpaper: ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue