From 970196d5fb2295e56dbcc419f9fc6f46c54bca4f Mon Sep 17 00:00:00 2001 From: larstvei Date: Sun, 28 Sep 2025 23:40:40 +0200 Subject: [PATCH] Log in to hyprlock Got the setup from here: https://www.reddit.com/r/hyprland/comments/1l7rlq0/how_to_setup_hyprlock_on_nixos/ Also, it's not really secure. I guess i beats booting into my user with no password. --- modules/desktop/hyprland/default.nix | 2 ++ modules/nixos/default.nix | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/modules/desktop/hyprland/default.nix b/modules/desktop/hyprland/default.nix index 47cb0bb..4990678 100644 --- a/modules/desktop/hyprland/default.nix +++ b/modules/desktop/hyprland/default.nix @@ -8,6 +8,8 @@ settings = { + exec-once = [ "hyprlock || hyprctl dispatch exit" ]; + misc.disable_hyprland_logo = true; general = { diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 6717187..d4619b8 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -32,9 +32,12 @@ services.greetd = { enable = true; - settings.default_session = { - command = "hyprland"; - user = "larstvei"; + settings = rec { + initial_session = { + command = "hyprland > /dev/null 2>&1"; + user = "larstvei"; + }; + default_session = initial_session; }; };