Merge remote-tracking branch 'origin/nixos' into nixos

This commit is contained in:
Moritz Böhme 2023-01-07 17:07:02 +01:00
commit 2a9648a3ec
No known key found for this signature in database
GPG key ID: 970C6E89EB0547A9
2 changed files with 45 additions and 28 deletions

View file

@ -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: ''