fix(hyprlock): respect system while showing lockscreen

This commit is contained in:
Mohammad Rafiq 2025-03-22 20:49:41 +08:00
parent 7993aae086
commit 439a54a35c
No known key found for this signature in database
3 changed files with 24 additions and 10 deletions

View file

@ -40,6 +40,17 @@
specialArgs = args; specialArgs = args;
modules = [ modules = [
./systems/mellinoe.nix ./systems/mellinoe.nix
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true; # inherit the nixpkgs and its config
useUserPackages = true;
extraSpecialArgs = args;
users.rafiq.imports = [
./users/rafiq.nix
];
};
}
]; ];
}; };
}; };

View file

@ -1,8 +1,3 @@
{
inputs,
pkgs,
...
}:
{ {
home.sessionVariables.NIXOS_OZONE_WL = "1"; home.sessionVariables.NIXOS_OZONE_WL = "1";
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {

View file

@ -1,16 +1,25 @@
{ pkgs, ... }: { pkgs, osConfig, ... }:
let
cfg =
if osConfig.networking.hostName == "nemesis" then
{
mainMonitor = "desc:OOO AN-270W04K";
}
else
{
mainMonitor = "";
};
in
{ {
programs.hyprlock = { programs.hyprlock = {
enable = true; enable = true;
package = null; package = null;
settings = { settings = {
"$mainMonitor" = "desc:OOO AN-270W04K";
"$vertMonitor" = "desc:Philips Consumer Electronics Company PHL 246V5 AU11330000086";
general.hide_cursor = true; general.hide_cursor = true;
label = { label = {
monitor = "HDMI-A-1"; monitor = cfg.mainMonitor;
text = ''hi, $USER.''; text = ''hi, $USER.'';
font_size = 32; font_size = 32;
halign = "center"; halign = "center";
@ -19,7 +28,6 @@
zindex = 1; zindex = 1;
}; };
input-field = { input-field = {
monitor = "HDMI-A-1";
fade_on_empty = true; fade_on_empty = true;
size = "200, 45"; size = "200, 45";
halign = "center"; halign = "center";