mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-22 01:31:33 +01:00
Modularize the DE config
This commit is contained in:
parent
38a5b3cbb1
commit
4b650721b0
11 changed files with 285 additions and 252 deletions
45
modules/home/de/hypridlelock.nix
Normal file
45
modules/home/de/hypridlelock.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.hyprlock.homeManagerModules.hyprlock
|
||||
inputs.hypridle.homeManagerModules.hypridle
|
||||
];
|
||||
|
||||
options.myConfig.de.hypridlelock.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.myConfig.de.hypridlelock.enable {
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
|
||||
backgrounds = [
|
||||
{
|
||||
path = "screenshot";
|
||||
blur_passes = 1;
|
||||
blur_size = 6;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
services.hypridle = let
|
||||
hyprlockExe = "${lib.getExe inputs.hyprlock.packages.${pkgs.system}.default}";
|
||||
in {
|
||||
enable = true;
|
||||
|
||||
lockCmd = "pidof ${hyprlockExe} || ${hyprlockExe}";
|
||||
# beforeSleepCmd = "loginctl lock-session";
|
||||
afterSleepCmd = "hyprctl dispatch dpms on";
|
||||
|
||||
listeners = [
|
||||
{
|
||||
timeout = 600;
|
||||
onTimeout = "loginctl lock-session";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue