Hyprland: add lock screen
This commit is contained in:
parent
e32305803a
commit
3686a64a29
@ -10,6 +10,11 @@ in
|
|||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
# Common options for standalone window managers; many of these (or
|
# Common options for standalone window managers; many of these (or
|
||||||
# alternatives thereof) are pulled in by desktop environments.
|
# alternatives thereof) are pulled in by desktop environments.
|
||||||
|
programs = {
|
||||||
|
swaylock = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
services = {
|
services = {
|
||||||
udiskie = {
|
udiskie = {
|
||||||
enable = mkDefault true;
|
enable = mkDefault true;
|
||||||
|
@ -4,6 +4,7 @@ let
|
|||||||
mkd = lib.mkDefault;
|
mkd = lib.mkDefault;
|
||||||
hyprland-pkg = config.wayland.windowManager.hyprland.finalPackage;
|
hyprland-pkg = config.wayland.windowManager.hyprland.finalPackage;
|
||||||
|
|
||||||
|
# commands
|
||||||
terminal = "${pkgs.kitty}/bin/kitty";
|
terminal = "${pkgs.kitty}/bin/kitty";
|
||||||
files = "${pkgs.dolphin}/bin/dolphin";
|
files = "${pkgs.dolphin}/bin/dolphin";
|
||||||
rofi = "${pkgs.rofi-wayland}/bin/rofi";
|
rofi = "${pkgs.rofi-wayland}/bin/rofi";
|
||||||
@ -11,6 +12,12 @@ let
|
|||||||
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
|
brightnessctl = "${pkgs.brightnessctl}/bin/brightnessctl";
|
||||||
polkit-agent = "${pkgs.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1";
|
polkit-agent = "${pkgs.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1";
|
||||||
grimblast = "${inputs.hyprwm-contrib.packages.${pkgs.system}.grimblast}/bin/grimblast";
|
grimblast = "${inputs.hyprwm-contrib.packages.${pkgs.system}.grimblast}/bin/grimblast";
|
||||||
|
swayidle = "${pkgs.swayidle}/bin/swayidle";
|
||||||
|
swaylock = "${pkgs.swaylock}/bin/swaylock";
|
||||||
|
hyprctl = "${hyprland-pkg}/bin/hyprctl";
|
||||||
|
|
||||||
|
lock-cmd = "${swaylock}";
|
||||||
|
idle-cmd = "${swayidle} -w timeout 300 '${hyprctl} dispatch dpms off' timeout 315 '${lock-cmd}' resume '${hyprctl} dispatch dpms on'";
|
||||||
|
|
||||||
hypr-dispatcher-package = pkgs.callPackage ./dispatcher { hyprland = hyprland-pkg; };
|
hypr-dispatcher-package = pkgs.callPackage ./dispatcher { hyprland = hyprland-pkg; };
|
||||||
hypr-dispatcher = "${hypr-dispatcher-package}/bin/hypr-dispatcher";
|
hypr-dispatcher = "${hypr-dispatcher-package}/bin/hypr-dispatcher";
|
||||||
@ -84,6 +91,7 @@ in
|
|||||||
notifydaemon
|
notifydaemon
|
||||||
polkit-agent
|
polkit-agent
|
||||||
xdpg-workaround
|
xdpg-workaround
|
||||||
|
idle-cmd
|
||||||
];
|
];
|
||||||
|
|
||||||
# Source a file (multi-file configs)
|
# Source a file (multi-file configs)
|
||||||
|
@ -14,6 +14,7 @@ in
|
|||||||
programs = {
|
programs = {
|
||||||
nm-applet.enable = mkDefault config.networking.networkmanager.enable;
|
nm-applet.enable = mkDefault config.networking.networkmanager.enable;
|
||||||
};
|
};
|
||||||
|
security.pam.services.swaylock = {};
|
||||||
};
|
};
|
||||||
options = {
|
options = {
|
||||||
nixfiles.common.wm.enable = mkEnableOption "common window manager configuration";
|
nixfiles.common.wm.enable = mkEnableOption "common window manager configuration";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user