feat(desktop/lockscreen): add hyprlock
This commit is contained in:
parent
5cb05a2dcb
commit
71706390b4
8 changed files with 62 additions and 0 deletions
|
@ -14,6 +14,7 @@
|
|||
desktop.windowManager = "hyprland";
|
||||
desktop.browser = "firefox";
|
||||
desktop.terminal = "ghostty";
|
||||
desktop.lockscreen = "hyprlock";
|
||||
|
||||
home.shellAliases = {
|
||||
v = "nvim";
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
{
|
||||
options.desktop = {
|
||||
windowManager = lib.pantheon.mkStrOption;
|
||||
lockscreen = lib.pantheon.mkStrOption;
|
||||
browser = lib.pantheon.mkStrOption;
|
||||
terminal = lib.pantheon.mkStrOption;
|
||||
};
|
||||
|
|
47
modules/home/desktop/lockscreen/default.nix
Normal file
47
modules/home/desktop/lockscreen/default.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf (config.desktop.lockscreen == "hyprlock") {
|
||||
home.sessionVariables.LOCKSCREEN = "hyprlock";
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general.hide_cursor = true;
|
||||
general.ignore_empty_input = true;
|
||||
|
||||
background = {
|
||||
blur_passes = 5;
|
||||
blur_size = 5;
|
||||
};
|
||||
|
||||
label = {
|
||||
text = ''hi, $USER.'';
|
||||
font_size = 32;
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
position = "0, 0";
|
||||
zindex = 1;
|
||||
shadow_passes = 5;
|
||||
shadow_size = 5;
|
||||
};
|
||||
|
||||
input-field = {
|
||||
fade_on_empty = true;
|
||||
size = "200, 45";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
position = "0, -5%";
|
||||
placeholder_text = "";
|
||||
zindex = 1;
|
||||
shadow_passes = 5;
|
||||
shadow_size = 5;
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
|
@ -20,6 +20,8 @@ in
|
|||
"${mainMonitor.id}, ${mainMonitor.resolution}@${mainMonitor.refresh-rate}, auto, ${mainMonitor.scale}"
|
||||
", preferred, auto, 1"
|
||||
];
|
||||
|
||||
exec-once = [ "uwsm app -- $LOCKSCREEN" ];
|
||||
}
|
||||
(import ./decoration.nix)
|
||||
(import ./keybinds.nix)
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
"SUPER, return, exec, uwsm app -- $TERMINAL $MULTIPLEXER"
|
||||
"SUPER, O, exec, uwsm app -- $BROWSER"
|
||||
"SUPER, Escape, exec, uwsm app -- $LOCKSCREEN"
|
||||
|
||||
"SUPER, H, cyclenext, visible"
|
||||
"SUPER, L, cyclenext, visible prev"
|
||||
|
|
|
@ -12,5 +12,6 @@
|
|||
refresh-rate = lib.pantheon.mkStrOption;
|
||||
};
|
||||
windowManager = lib.pantheon.mkStrOption;
|
||||
lockscreen = lib.pantheon.mkStrOption;
|
||||
};
|
||||
}
|
||||
|
|
8
modules/nixos/desktop/lockscreen/default.nix
Normal file
8
modules/nixos/desktop/lockscreen/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf (config.desktop.lockscreen == "hyprlock") {
|
||||
security.pam.services.hyprlock = { };
|
||||
})
|
||||
];
|
||||
}
|
|
@ -16,6 +16,7 @@
|
|||
hardware.gpu = "nvidia";
|
||||
|
||||
desktop.windowManager = "hyprland";
|
||||
desktop.lockscreen = "hyprlock";
|
||||
desktop.mainMonitor = {
|
||||
id = "desc:OOO AN-270W04K";
|
||||
scale = "2";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue