DashNix/modules/programs/hyprland/hyprlock.nix

42 lines
1.1 KiB
Nix

{ config, lib, options, pkgs, ... }: {
options.mods = {
hyprland.hyprlock = {
enable = lib.mkOption {
default = true;
example = false;
type = lib.types.bool;
description = "Enables Hyprlock";
};
};
};
config = lib.mkIf config.mods.hyprland.hyprlock.enable
(lib.optionalAttrs (options ? xdg.configFile) {
home.packages = with pkgs; [ hyprlock ];
programs.hyprlock = lib.mkIf config.mods.hyprland.hyprlock.enable {
enable = true;
settings = {
background = [{
monitor = "";
path = "";
color = "rgba(26, 27, 38, 1.0)";
}];
input-field = [{
monitor = "${config.conf.monitor}";
placeholder_text = "password or something";
}];
label = [{
monitor = "${config.conf.monitor}";
text = "$TIME";
font_size = 50;
position = "0, 200";
valign = "center";
halign = "center";
}];
};
};
});
}